From 80595f5bd76c7f5888bb32ab35c58df8b5b63257 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 6 Jun 2013 19:33:47 -0400 Subject: [PATCH] --- yaml --- r: 377109 b: refs/heads/master c: 05252901199d886a68830befb135d1723730ca86 h: refs/heads/master i: 377107: 0e0c836235b6917e8bd77e6f0049da2d9510406a v: v3 --- [refs] | 2 +- trunk/fs/namei.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index b26e5ca6109e..7f118a94bebd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8aac62706adaaf0fab02c4327761561c8bda9448 +refs/heads/master: 05252901199d886a68830befb135d1723730ca86 diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 85e40d1c0a8f..9ed9361223c0 100644 --- a/trunk/fs/namei.c +++ b/trunk/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 @@ static int do_last(struct nameidata *nd, struct path *path, 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: