From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman) Subject: [PATCH 14/14] sysfs: In sysfs_lookup don't open code sysfs_find_dirent Date: Tue, 31 Jul 2007 04:42:47 -0600 Message-ID: References: <1182446577.8138.29.camel@localhost> <46AEAF79.6080404@suse.de> <46AEBA87.6000400@suse.de> <46AEEF75.2030101@suse.de> <46AEEFA6.4000901@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: (Eric W. Biederman's message of "Tue, 31 Jul 2007 04:42:02 -0600") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Tejun Heo Cc: Linux Containers , Greg KH , Greg KH , Dave Hansen List-Id: containers.vger.kernel.org This is a small cleanup patch that makes the code just a little bit cleaner. Signed-off-by: Eric W. Biederman --- fs/sysfs/dir.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c index f9be856..66d418a 100644 --- a/fs/sysfs/dir.c +++ b/fs/sysfs/dir.c @@ -705,10 +705,7 @@ static struct dentry * sysfs_lookup(struct inode *dir, struct dentry *dentry, if (result) goto out; - for (sd = parent_sd->s_children; sd; sd = sd->s_sibling) { - if (!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.1.1.181.g2de0