[Devel] [PATCH 06/14] sysfs: In sysfs_lookup don't open code sysfs_find_dirent
Tejun Heo
htejun at gmail.com
Mon Aug 20 05:36:30 PDT 2007
From: Eric W. Biederman <ebiederm at xmission.com>
This is a small cleanup patch that makes the code just
a little bit cleaner.
Signed-off-by: Eric W. Biederman <ebiederm at xmission.com>
Signed-off-by: Tejun Heo <htejun at gmail.com>
---
fs/sysfs/dir.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 8565d1b..f0fa789 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,
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)
--
1.5.0.3
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list