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>
This commit is contained in:
Al Viro 2018-04-30 20:02:31 -04:00
parent b014951692
commit b135dcea37

View File

@ -114,13 +114,9 @@ struct dentry * qnx4_lookup(struct inode *dir, struct dentry *dentry, unsigned i
brelse(bh); brelse(bh);
foundinode = qnx4_iget(dir->i_sb, ino); foundinode = qnx4_iget(dir->i_sb, ino);
if (IS_ERR(foundinode)) { if (IS_ERR(foundinode))
QNX4DEBUG((KERN_ERR "qnx4: lookup->iget -> error %ld\n", QNX4DEBUG((KERN_ERR "qnx4: lookup->iget -> error %ld\n",
PTR_ERR(foundinode))); PTR_ERR(foundinode)));
return ERR_CAST(foundinode);
}
out: out:
d_add(dentry, foundinode); return d_splice_alias(foundinode, dentry);
return NULL;
} }