diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-06 23:33:47 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-15 01:41:45 (GMT) |
commit | 05252901199d886a68830befb135d1723730ca86 (patch) | |
tree | f973243a3fefc56ce91a963a91eaa68a445ffd6e | |
parent | 8aac62706adaaf0fab02c4327761561c8bda9448 (diff) | |
download | linux-05252901199d886a68830befb135d1723730ca86.tar.xz |
use can_lookup() instead of direct checks of ->i_op->lookup
a couple of places got missed back when Linus has introduced that one...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/namei.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1976,7 +1976,7 @@ static int path_lookupat(int dfd, const char *name, err = complete_walk(nd); if (!err && nd->flags & LOOKUP_DIRECTORY) { - if (!nd->inode->i_op->lookup) { + if (!can_lookup(nd->inode)) { path_put(&nd->path); err = -ENOTDIR; } @@ -2850,7 +2850,7 @@ finish_lookup: if ((open_flag & O_CREAT) && S_ISDIR(nd->inode->i_mode)) goto out; error = -ENOTDIR; - if ((nd->flags & LOOKUP_DIRECTORY) && !nd->inode->i_op->lookup) + if ((nd->flags & LOOKUP_DIRECTORY) && !can_lookup(nd->inode)) goto out; audit_inode(name, nd->path.dentry, 0); finish_open: |