diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-04-30 19:20:00 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-05-22 14:27:51 -0400 |
commit | 72ff0b038de27118a95a3c4c4d4a2126902899c6 (patch) | |
tree | 9a300bd72da8482193e34d47e868fa966e8715d6 | |
parent | d023b3a19fd5e9d3955b02581a4ca479c6bcef6e (diff) | |
download | linux-72ff0b038de27118a95a3c4c4d4a2126902899c6.tar.gz linux-72ff0b038de27118a95a3c4c4d4a2126902899c6.tar.bz2 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>
-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); } /** |