Skip to content

Commit

Permalink
sysfs: In sysfs_lookup don't open code sysfs_find_dirent
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric W. Biederman authored and Greg Kroah-Hartman committed Oct 12, 2007
1 parent 7d0c7d6 commit 94777e0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/sysfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,9 +756,7 @@ static struct dentry * sysfs_lookup(struct inode *dir, struct dentry *dentry,

mutex_lock(&sysfs_mutex);

for (sd = parent_sd->s_children; sd; sd = sd->s_sibling)
if (sysfs_type(sd) && !strcmp(sd->s_name, dentry->d_name.name))
break;
sd = sysfs_find_dirent(parent_sd, dentry->d_name.name);

/* no such entry */
if (!sd)
Expand Down

0 comments on commit 94777e0

Please sign in to comment.