提交 e77fb7ce 编写于 作者: A Al Viro

sysfs: just use d_materialise_unique()

same as for nfs et.al.
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册