1
0
Fork 0

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>
hifive-unleashed-5.1
Al Viro 2018-04-30 19:20:00 -04:00
parent d023b3a19f
commit 72ff0b038d
1 changed files with 2 additions and 6 deletions

View File

@ -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);
}
/**