diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-05-01 01:20:00 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-05-22 20:27:51 +0200 |
commit | 72ff0b038de27118a95a3c4c4d4a2126902899c6 (patch) | |
tree | 9a300bd72da8482193e34d47e868fa966e8715d6 /fs/freevxfs/vxfs_lookup.c | |
parent | cramfs_lookup(): use d_splice_alias() (diff) | |
download | linux-72ff0b038de27118a95a3c4c4d4a2126902899c6.tar.xz linux-72ff0b038de27118a95a3c4c4d4a2126902899c6.zip |
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.c | 8 |
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); } /** |