sysfs: just use d_materialise_unique()
same as for nfs et.al. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Родитель
469796d105
Коммит
e77fb7cef8
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче