diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-08 02:56:54 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-14 14:35:12 +0200 |
commit | e77fb7cef87856d9d35f2f4d617d0b97148ee7c2 (patch) | |
tree | 5be57ddbe300bdd3d6bfc04632a9464c60f4c961 /fs/sysfs | |
parent | sysfs: switch to ->s_d_op and ->d_release() (diff) | |
download | linux-e77fb7cef87856d9d35f2f4d617d0b97148ee7c2.tar.xz linux-e77fb7cef87856d9d35f2f4d617d0b97148ee7c2.zip |
sysfs: just use d_materialise_unique()
same as for nfs et.al.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/sysfs')
-rw-r--r-- | fs/sysfs/dir.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c index 77c44ce493f8..a5cf784f9cc2 100644 --- a/fs/sysfs/dir.c +++ b/fs/sysfs/dir.c @@ -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; |