The subject says it all.

Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]>
---
 fs/sysfs/dir.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 834ed74..8430633 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -748,19 +748,16 @@ static struct dentry * sysfs_lookup(struct inode *dir, 
struct dentry *dentry,
        struct dentry *result = NULL;
        struct sysfs_dirent * sd;
        struct inode *inode;
-       int found = 0;
 
        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)) {
-                       found = 1;
+                   !strcmp(sd->s_name, dentry->d_name.name))
                        break;
-               }
        }
 
        /* no such entry */
-       if (!found)
+       if (!sd)
                goto out;
 
        /* attach dentry and inode */
-- 
1.5.1.1.181.g2de0

_______________________________________________
Containers mailing list
[EMAIL PROTECTED]
https://lists.linux-foundation.org/mailman/listinfo/containers

_______________________________________________
Devel mailing list
Devel@openvz.org
https://openvz.org/mailman/listinfo/devel

Reply via email to