diff options
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, | |||
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; |