aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-06-07 20:56:54 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-14 08:35:12 -0400
commite77fb7cef87856d9d35f2f4d617d0b97148ee7c2 (patch)
tree5be57ddbe300bdd3d6bfc04632a9464c60f4c961 /fs/sysfs
parent469796d10590341c53cff0a2959254eaf5d465de (diff)
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.c9
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,
793 } 793 }
794 794
795 /* instantiate and hash dentry */ 795 /* instantiate and hash dentry */
796 ret = d_find_alias(inode); 796 ret = d_materialise_unique(dentry, inode);
797 if (!ret) {
798 d_add(dentry, inode);
799 } else {
800 d_move(ret, dentry);
801 iput(inode);
802 }
803
804 out_unlock: 797 out_unlock:
805 mutex_unlock(&sysfs_mutex); 798 mutex_unlock(&sysfs_mutex);
806 return ret; 799 return ret;