aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2007-08-20 08:36:30 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 17:51:08 -0400
commit94777e09180b6249d455baa2dbe34cf630e0c033 (patch)
treee8d31efaed978ff452045053c8b3716bbc052cf5 /fs/sysfs
parent7d0c7d676cc066413e1583b5af9fba8011972d41 (diff)
sysfs: In sysfs_lookup don't open code sysfs_find_dirent
This is a small cleanup patch that makes the code just a little bit cleaner. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/sysfs')
-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 7f4abe17670..b72b42ed80d 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)