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

Commit 50f30740 authored by Al Viro's avatar Al Viro
Browse files

hostfs_lookup: switch to d_splice_alias()



Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent ce397d21
Loading
Loading
Loading
Loading
+8 −20
Original line number Diff line number Diff line
@@ -610,33 +610,21 @@ static struct dentry *hostfs_lookup(struct inode *ino, struct dentry *dentry,
	int err;

	inode = hostfs_iget(ino->i_sb);
	if (IS_ERR(inode)) {
		err = PTR_ERR(inode);
	if (IS_ERR(inode))
		goto out;
	}

	err = -ENOMEM;
	name = dentry_name(dentry);
	if (name == NULL)
		goto out_put;

	if (name) {
		err = read_name(inode, name);

		__putname(name);
	if (err == -ENOENT) {
		iput(inode);
		inode = NULL;
	}
	else if (err)
		goto out_put;

	d_add(dentry, inode);
	return NULL;

 out_put:
	if (err) {
		iput(inode);
		inode = (err == -ENOENT) ? NULL : ERR_PTR(err);
	}
 out:
	return ERR_PTR(err);
	return d_splice_alias(inode, dentry);
}

static int hostfs_link(struct dentry *to, struct inode *ino,