Loading fs/namei.c +3 −0 Original line number Diff line number Diff line Loading @@ -2386,6 +2386,9 @@ static struct file *do_last(struct nameidata *nd, struct path *path, error = -EISDIR; if (S_ISDIR(nd->inode->i_mode)) goto exit; error = -ENOTDIR; if ((nd->flags & LOOKUP_DIRECTORY) && !nd->inode->i_op->lookup) goto exit; ok: if (!S_ISREG(nd->inode->i_mode)) will_truncate = 0; Loading Loading
fs/namei.c +3 −0 Original line number Diff line number Diff line Loading @@ -2386,6 +2386,9 @@ static struct file *do_last(struct nameidata *nd, struct path *path, error = -EISDIR; if (S_ISDIR(nd->inode->i_mode)) goto exit; error = -ENOTDIR; if ((nd->flags & LOOKUP_DIRECTORY) && !nd->inode->i_op->lookup) goto exit; ok: if (!S_ISREG(nd->inode->i_mode)) will_truncate = 0; Loading