diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-20 18:41:28 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-20 18:57:35 (GMT) |
commit | 741b7c3f77937b2fb7c10aeb4c5c621463582583 (patch) | |
tree | 9efdcf5a4cd25d3101e712e219a7c1d1a5d346d1 /fs | |
parent | 582aa64a04a579d47d05e4a0ee85bf047978ef4d (diff) | |
download | linux-741b7c3f77937b2fb7c10aeb4c5c621463582583.tar.xz |
path_init(): make -ENOTDIR failure exits consistent
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/namei.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1859,7 +1859,7 @@ static int path_init(int dfd, const char *name, unsigned int flags, if (flags & LOOKUP_ROOT) { struct inode *inode = nd->root.dentry->d_inode; if (*name) { - if (!inode->i_op->lookup) + if (!can_lookup(inode)) return -ENOTDIR; retval = inode_permission(inode, MAY_EXEC); if (retval) @@ -1913,7 +1913,7 @@ static int path_init(int dfd, const char *name, unsigned int flags, dentry = f.file->f_path.dentry; if (*name) { - if (!S_ISDIR(dentry->d_inode->i_mode)) { + if (!can_lookup(dentry->d_inode)) { fdput(f); return -ENOTDIR; } |