Commit e77fb7ce authored by Al Viro's avatar Al Viro

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
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment