Commit 05252901199d886a68830befb135d1723730ca86

Authored by Al Viro
1 parent 8aac62706a

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>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -1976,7 +1976,7 @@
1976 1976 err = complete_walk(nd);
1977 1977  
1978 1978 if (!err && nd->flags & LOOKUP_DIRECTORY) {
1979   - if (!nd->inode->i_op->lookup) {
  1979 + if (!can_lookup(nd->inode)) {
1980 1980 path_put(&nd->path);
1981 1981 err = -ENOTDIR;
1982 1982 }
... ... @@ -2850,7 +2850,7 @@
2850 2850 if ((open_flag & O_CREAT) && S_ISDIR(nd->inode->i_mode))
2851 2851 goto out;
2852 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 2854 goto out;
2855 2855 audit_inode(name, nd->path.dentry, 0);
2856 2856 finish_open: