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

Commit e77fb7ce authored by Al Viro's avatar Al Viro
Browse files

sysfs: just use d_materialise_unique()



same as for nfs et.al.

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 469796d1
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -793,14 +793,7 @@ static struct dentry * sysfs_lookup(struct inode *dir, struct dentry *dentry,
	}

	/* instantiate and hash dentry */
	ret = d_find_alias(inode);
	if (!ret) {
		d_add(dentry, inode);
	} else {
		d_move(ret, dentry);
		iput(inode);
	}

	ret = d_materialise_unique(dentry, inode);
 out_unlock:
	mutex_unlock(&sysfs_mutex);
	return ret;