mirror of
https://github.com/torvalds/linux
synced 2024-10-14 15:29:13 +00:00
hostfs: use d_splice_alias() calling conventions to simplify failure exits
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
5e7582f6e3
commit
6f36230e23
|
@ -637,12 +637,8 @@ static struct dentry *hostfs_lookup(struct inode *ino, struct dentry *dentry,
|
||||||
|
|
||||||
inode = hostfs_iget(ino->i_sb, name);
|
inode = hostfs_iget(ino->i_sb, name);
|
||||||
__putname(name);
|
__putname(name);
|
||||||
if (IS_ERR(inode)) {
|
if (inode == ERR_PTR(-ENOENT))
|
||||||
if (PTR_ERR(inode) == -ENOENT)
|
inode = NULL;
|
||||||
inode = NULL;
|
|
||||||
else
|
|
||||||
return ERR_CAST(inode);
|
|
||||||
}
|
|
||||||
|
|
||||||
return d_splice_alias(inode, dentry);
|
return d_splice_alias(inode, dentry);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue