dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Eric W. Biederman 2007-08-20 21:36:30 +09:00 committed by Greg Kroah-Hartman
parent 7d0c7d676c
commit 94777e0918
1 changed files with 1 additions and 3 deletions

View File

@ -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)