Skip to content

Commit b135dce

Browse files
author
Al Viro
committed
qnx4_lookup: use d_splice_alias()
code is simpler that way Acked-by: Anders Larsen <al@alarsen.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent b014951 commit b135dce

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎fs/qnx4/namei.c‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,9 @@ struct dentry * qnx4_lookup(struct inode *dir, struct dentry *dentry, unsigned i
114114
brelse(bh);
115115

116116
foundinode = qnx4_iget(dir->i_sb, ino);
117-
if (IS_ERR(foundinode)) {
117+
if (IS_ERR(foundinode))
118118
QNX4DEBUG((KERN_ERR "qnx4: lookup->iget -> error %ld\n",
119119
PTR_ERR(foundinode)));
120-
return ERR_CAST(foundinode);
121-
}
122120
out:
123-
d_add(dentry, foundinode);
124-
125-
return NULL;
121+
return d_splice_alias(foundinode, dentry);
126122
}

0 commit comments

Comments
 (0)