Skip to content

Commit

Permalink
lookup_open(): expand the call of real_lookup()
Browse files Browse the repository at this point in the history
... and lose the duplicate IS_DEADDIR() - we'd already checked that.

Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed May 2, 2016
1 parent 384f26e commit 12fa5e2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 12fa5e2

Please sign in to comment.