From: Al Viro Date: Thu, 6 Jun 2013 23:33:47 +0000 (-0400) Subject: use can_lookup() instead of direct checks of ->i_op->lookup X-Git-Tag: v3.10-rc6~5^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=05252901199d886a68830befb135d1723730ca86;p=platform%2Fkernel%2Flinux-stable.git 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 --- diff --git a/fs/namei.c b/fs/namei.c index 85e40d1..9ed9361 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -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: