aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sysfs/dir.c')
-rw-r--r--fs/sysfs/dir.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 7f4abe176701..b72b42ed80d1 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -756,9 +756,7 @@ static struct dentry * sysfs_lookup(struct inode *dir, struct dentry *dentry,
756 756
757 mutex_lock(&sysfs_mutex); 757 mutex_lock(&sysfs_mutex);
758 758
759 for (sd = parent_sd->s_children; sd; sd = sd->s_sibling) 759 sd = sysfs_find_dirent(parent_sd, dentry->d_name.name);
760 if (sysfs_type(sd) && !strcmp(sd->s_name, dentry->d_name.name))
761 break;
762 760
763 /* no such entry */ 761 /* no such entry */
764 if (!sd) 762 if (!sd)