summaryrefslogtreecommitdiffstats
path: root/fs
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 16:35:12 +0400
commite77fb7cef87856d9d35f2f4d617d0b97148ee7c2 (patch)
tree5be57ddbe300bdd3d6bfc04632a9464c60f4c961 /fs
parent469796d10590341c53cff0a2959254eaf5d465de (diff)
downloadlinux-e77fb7cef87856d9d35f2f4d617d0b97148ee7c2.tar.bz2
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')
-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,
}
/* 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;