Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d473012710b815741043942bc41945d444abab40
Commit:     d473012710b815741043942bc41945d444abab40
Parent:     b70c394099851c1398e9fd0fd64cf13ef2d093a1
Author:     Matthias Kaehlcke <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 18 23:39:57 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Oct 19 11:53:38 2007 -0700

    fs/super.c: use list_for_each_entry() instead of list_for_each()
    
    fs/super.c: use list_for_each_entry() instead of list_for_each() in
    sget()
    
    [EMAIL PROTECTED]: clean up some crap while we're there]
    Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/super.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/fs/super.c b/fs/super.c
index d62629c..feaae7e 100644
--- a/fs/super.c
+++ b/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);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to