Skip to content

Commit

Permalink
qnx4_lookup: use d_splice_alias()
Browse files Browse the repository at this point in the history
code is simpler that way

Acked-by: Anders Larsen <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed May 22, 2018
1 parent b014951 commit b135dce
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions fs/qnx4/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,9 @@ struct dentry * qnx4_lookup(struct inode *dir, struct dentry *dentry, unsigned i
brelse(bh);

foundinode = qnx4_iget(dir->i_sb, ino);
if (IS_ERR(foundinode)) {
if (IS_ERR(foundinode))
QNX4DEBUG((KERN_ERR "qnx4: lookup->iget -> error %ld\n",
PTR_ERR(foundinode)));
return ERR_CAST(foundinode);
}
out:
d_add(dentry, foundinode);

return NULL;
return d_splice_alias(foundinode, dentry);
}

0 comments on commit b135dce

Please sign in to comment.