aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/namei.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c
index e245d88b4d69..35195ff9d194 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1859,7 +1859,7 @@ static int path_init(int dfd, const char *name, unsigned int flags,
1859 if (flags & LOOKUP_ROOT) { 1859 if (flags & LOOKUP_ROOT) {
1860 struct inode *inode = nd->root.dentry->d_inode; 1860 struct inode *inode = nd->root.dentry->d_inode;
1861 if (*name) { 1861 if (*name) {
1862 if (!inode->i_op->lookup) 1862 if (!can_lookup(inode))
1863 return -ENOTDIR; 1863 return -ENOTDIR;
1864 retval = inode_permission(inode, MAY_EXEC); 1864 retval = inode_permission(inode, MAY_EXEC);
1865 if (retval) 1865 if (retval)
@@ -1913,7 +1913,7 @@ static int path_init(int dfd, const char *name, unsigned int flags,
1913 dentry = f.file->f_path.dentry; 1913 dentry = f.file->f_path.dentry;
1914 1914
1915 if (*name) { 1915 if (*name) {
1916 if (!S_ISDIR(dentry->d_inode->i_mode)) { 1916 if (!can_lookup(dentry->d_inode)) {
1917 fdput(f); 1917 fdput(f);
1918 return -ENOTDIR; 1918 return -ENOTDIR;
1919 } 1919 }