diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-04-30 20:02:31 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-05-22 14:27:52 -0400 |
commit | b135dcea37d1506332796a6ff48fc30be7c5e384 (patch) | |
tree | 92d3fec23d0369d9bf26c6e426b2bc3f06f0ab9a /fs/qnx4 | |
parent | b0149516925680b86d94d03717af6ae1ab83ffa8 (diff) | |
download | lwn-b135dcea37d1506332796a6ff48fc30be7c5e384.tar.gz lwn-b135dcea37d1506332796a6ff48fc30be7c5e384.zip |
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>
Diffstat (limited to 'fs/qnx4')
-rw-r--r-- | fs/qnx4/namei.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/qnx4/namei.c b/fs/qnx4/namei.c index eca27878079d..8d72221735d7 100644 --- a/fs/qnx4/namei.c +++ b/fs/qnx4/namei.c @@ -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); } |