]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.31/patches.suse/dlm-fsdlm-ast.c-fix-warning.patch
Reenabled linux-xen, added patches for Xen Kernel Version 2.6.27.31,
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.suse / dlm-fsdlm-ast.c-fix-warning.patch
diff --git a/src/patches/suse-2.6.27.31/patches.suse/dlm-fsdlm-ast.c-fix-warning.patch b/src/patches/suse-2.6.27.31/patches.suse/dlm-fsdlm-ast.c-fix-warning.patch
new file mode 100644 (file)
index 0000000..b91e235
--- /dev/null
@@ -0,0 +1,75 @@
+From: Andrew Morton <akpm@linux-foundation.org>
+commit 722d74219ea21223c74e5e894b0afcc5e4ca75a7
+Author: Andrew Morton <akpm@linux-foundation.org>
+Date:   Tue Dec 23 10:22:56 2008 -0600
+Subject: dlm: fs/dlm/ast.c: fix warning
+    
+    fs/dlm/ast.c: In function 'dlm_astd':
+    fs/dlm/ast.c:64: warning: 'bastmode' may be used uninitialized in this function
+    
+    Cleans code up.
+    
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: David Teigland <teigland@redhat.com>
+Signed-off-by: Coly Li <coly.li@suse.de>
+
+diff --git a/fs/dlm/ast.c b/fs/dlm/ast.c
+index fbe840d..dc2ad60 100644
+--- a/fs/dlm/ast.c
++++ b/fs/dlm/ast.c
+@@ -61,30 +61,23 @@ static void process_asts(void)
+       struct dlm_lkb *lkb;
+       void (*cast) (void *astparam);
+       void (*bast) (void *astparam, int mode);
+-      int type = 0, found, bastmode;
+-
+-      for (;;) {
+-              found = 0;
+-              spin_lock(&ast_queue_lock);
+-              list_for_each_entry(lkb, &ast_queue, lkb_astqueue) {
+-                      r = lkb->lkb_resource;
+-                      ls = r->res_ls;
+-
+-                      if (dlm_locking_stopped(ls))
+-                              continue;
+-
+-                      list_del(&lkb->lkb_astqueue);
+-                      type = lkb->lkb_ast_type;
+-                      lkb->lkb_ast_type = 0;
+-                      bastmode = lkb->lkb_bastmode;
+-                      found = 1;
+-                      break;
+-              }
+-              spin_unlock(&ast_queue_lock);
++      int type = 0, bastmode;
++
++repeat:
++      spin_lock(&ast_queue_lock);
++      list_for_each_entry(lkb, &ast_queue, lkb_astqueue) {
++              r = lkb->lkb_resource;
++              ls = r->res_ls;
+-              if (!found)
+-                      break;
++              if (dlm_locking_stopped(ls))
++                      continue;
++              list_del(&lkb->lkb_astqueue);
++              type = lkb->lkb_ast_type;
++              lkb->lkb_ast_type = 0;
++              bastmode = lkb->lkb_bastmode;
++
++              spin_unlock(&ast_queue_lock);
+               cast = lkb->lkb_astfn;
+               bast = lkb->lkb_bastfn;
+@@ -99,7 +92,9 @@ static void process_asts(void)
+               dlm_put_lkb(lkb);
+               cond_resched();
++              goto repeat;
+       }
++      spin_unlock(&ast_queue_lock);
+ }
+ static inline int no_asts(void)