From dddc3c2afa3f9eaa0e25303721c8e2009532f2da Mon Sep 17 00:00:00 2001 From: Matthias Kaehlcke Date: Thu, 18 Oct 2007 23:39:57 -0700 Subject: [PATCH] --- yaml --- r: 71436 b: refs/heads/master c: d473012710b815741043942bc41945d444abab40 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/super.c | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 1ae4b1352125..d8df96e7e132 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b70c394099851c1398e9fd0fd64cf13ef2d093a1 +refs/heads/master: d473012710b815741043942bc41945d444abab40 diff --git a/trunk/fs/super.c b/trunk/fs/super.c index d62629c6c0cb..feaae7eeaffd 100644 --- a/trunk/fs/super.c +++ b/trunk/fs/super.c @@ -332,21 +332,21 @@ struct super_block *sget(struct file_system_type *type, void *data) { struct super_block *s = NULL; - struct list_head *p; + struct super_block *old; int err; retry: spin_lock(&sb_lock); - if (test) list_for_each(p, &type->fs_supers) { - struct super_block *old; - old = list_entry(p, struct super_block, s_instances); - if (!test(old, data)) - continue; - if (!grab_super(old)) - goto retry; - if (s) - destroy_super(s); - return old; + if (test) { + list_for_each_entry(old, &type->fs_supers, s_instances) { + if (!test(old, data)) + continue; + if (!grab_super(old)) + goto retry; + if (s) + destroy_super(s); + return old; + } } if (!s) { spin_unlock(&sb_lock);