diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-04-28 11:19:43 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-05-02 19:51:16 -0400 |
commit | 12fa5e240419237d848abe3d40809eabe9e8f4ca (patch) | |
tree | a3a0aedac1936092415ac811eabaae8e97d724f2 /fs/namei.c | |
parent | 384f26e28fe4ddc75e7cf8e0e21595964d03d8eb (diff) | |
download | linux-12fa5e240419237d848abe3d40809eabe9e8f4ca.tar.gz linux-12fa5e240419237d848abe3d40809eabe9e8f4ca.tar.bz2 linux-12fa5e240419237d848abe3d40809eabe9e8f4ca.zip |
lookup_open(): expand the call of real_lookup()
... and lose the duplicate IS_DEADDIR() - we'd already checked that.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/namei.c b/fs/namei.c index 8d62a89d7bff..b9dde8490318 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2969,9 +2969,16 @@ static int lookup_open(struct nameidata *nd, struct path *path, no_open: if (need_lookup) { - dentry = lookup_real(dir_inode, dentry, nd->flags); - if (IS_ERR(dentry)) - return PTR_ERR(dentry); + struct dentry *res = dir_inode->i_op->lookup(dir_inode, dentry, + nd->flags); + if (unlikely(res)) { + if (IS_ERR(res)) { + error = PTR_ERR(res); + goto out_dput; + } + dput(dentry); + dentry = res; + } } /* Negative dentry, just create the file */ |