Commit 6f36230e authored by Al Viro's avatar Al Viro
Browse files

hostfs: use d_splice_alias() calling conventions to simplify failure exits



Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 5e7582f6
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -637,12 +637,8 @@ static struct dentry *hostfs_lookup(struct inode *ino, struct dentry *dentry,

	inode = hostfs_iget(ino->i_sb, name);
	__putname(name);
	if (IS_ERR(inode)) {
		if (PTR_ERR(inode) == -ENOENT)
	if (inode == ERR_PTR(-ENOENT))
		inode = NULL;
		else
			return ERR_CAST(inode);
	}

	return d_splice_alias(inode, dentry);
}