diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-06 19:33:47 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-14 21:41:45 -0400 |
commit | 05252901199d886a68830befb135d1723730ca86 (patch) | |
tree | f973243a3fefc56ce91a963a91eaa68a445ffd6e | |
parent | 8aac62706adaaf0fab02c4327761561c8bda9448 (diff) |
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
diff --git a/fs/namei.c b/fs/namei.c index 85e40d1c0a8f..9ed9361223c0 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1976,7 +1976,7 @@ static int path_lookupat(int dfd, const char *name, | |||
1976 | err = complete_walk(nd); | 1976 | err = complete_walk(nd); |
1977 | 1977 | ||
1978 | if (!err && nd->flags & LOOKUP_DIRECTORY) { | 1978 | if (!err && nd->flags & LOOKUP_DIRECTORY) { |
1979 | if (!nd->inode->i_op->lookup) { | 1979 | if (!can_lookup(nd->inode)) { |
1980 | path_put(&nd->path); | 1980 | path_put(&nd->path); |
1981 | err = -ENOTDIR; | 1981 | err = -ENOTDIR; |
1982 | } | 1982 | } |
@@ -2850,7 +2850,7 @@ finish_lookup: | |||
2850 | if ((open_flag & O_CREAT) && S_ISDIR(nd->inode->i_mode)) | 2850 | if ((open_flag & O_CREAT) && S_ISDIR(nd->inode->i_mode)) |
2851 | goto out; | 2851 | goto out; |
2852 | error = -ENOTDIR; | 2852 | error = -ENOTDIR; |
2853 | if ((nd->flags & LOOKUP_DIRECTORY) && !nd->inode->i_op->lookup) | 2853 | if ((nd->flags & LOOKUP_DIRECTORY) && !can_lookup(nd->inode)) |
2854 | goto out; | 2854 | goto out; |
2855 | audit_inode(name, nd->path.dentry, 0); | 2855 | audit_inode(name, nd->path.dentry, 0); |
2856 | finish_open: | 2856 | finish_open: |