aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/namei.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/namei.c b/fs/namei.c
index a7e994bb78c2..4767c0588b6e 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2386,6 +2386,9 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
2386 error = -EISDIR; 2386 error = -EISDIR;
2387 if (S_ISDIR(nd->inode->i_mode)) 2387 if (S_ISDIR(nd->inode->i_mode))
2388 goto exit; 2388 goto exit;
2389 error = -ENOTDIR;
2390 if ((nd->flags & LOOKUP_DIRECTORY) && !nd->inode->i_op->lookup)
2391 goto exit;
2389ok: 2392ok:
2390 if (!S_ISREG(nd->inode->i_mode)) 2393 if (!S_ISREG(nd->inode->i_mode))
2391 will_truncate = 0; 2394 will_truncate = 0;