summaryrefslogtreecommitdiff
path: root/fs/freevxfs/vxfs_lookup.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-05-01 02:20:00 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2018-05-22 21:27:51 +0300
commit72ff0b038de27118a95a3c4c4d4a2126902899c6 (patch)
tree9a300bd72da8482193e34d47e868fa966e8715d6 /fs/freevxfs/vxfs_lookup.c
parentd023b3a19fd5e9d3955b02581a4ca479c6bcef6e (diff)
downloadlinux-72ff0b038de27118a95a3c4c4d4a2126902899c6.tar.xz
freevxfs_lookup(): use d_splice_alias()
code is simpler that way Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/freevxfs/vxfs_lookup.c')
-rw-r--r--fs/freevxfs/vxfs_lookup.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/freevxfs/vxfs_lookup.c b/fs/freevxfs/vxfs_lookup.c
index ce4785fd81c6..a51425634f65 100644
--- a/fs/freevxfs/vxfs_lookup.c
+++ b/fs/freevxfs/vxfs_lookup.c
@@ -193,13 +193,9 @@ vxfs_lookup(struct inode *dip, struct dentry *dp, unsigned int flags)
return ERR_PTR(-ENAMETOOLONG);
ino = vxfs_inode_by_name(dip, dp);
- if (ino) {
+ if (ino)
ip = vxfs_iget(dip->i_sb, ino);
- if (IS_ERR(ip))
- return ERR_CAST(ip);
- }
- d_add(dp, ip);
- return NULL;
+ return d_splice_alias(ip, dp);
}
/**