Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3837d208 authored by Al Viro's avatar Al Viro
Browse files

simplify btrfs_lookup()



d_splice_alias() is fine with ERR_PTR(-E...) for inode

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 8300807f
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -5807,16 +5807,10 @@ static int btrfs_dentry_delete(const struct dentry *dentry)
static struct dentry *btrfs_lookup(struct inode *dir, struct dentry *dentry,
				   unsigned int flags)
{
	struct inode *inode;
	struct inode *inode = btrfs_lookup_dentry(dir, dentry);

	inode = btrfs_lookup_dentry(dir, dentry);
	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);
}