1 From: Andrew Morton <akpm@linux-foundation.org>
2 commit 722d74219ea21223c74e5e894b0afcc5e4ca75a7
3 Author: Andrew Morton <akpm@linux-foundation.org>
4 Date: Tue Dec 23 10:22:56 2008 -0600
5 Subject: dlm: fs/dlm/ast.c: fix warning
7 fs/dlm/ast.c: In function 'dlm_astd':
8 fs/dlm/ast.c:64: warning: 'bastmode' may be used uninitialized in this function
12 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
13 Signed-off-by: David Teigland <teigland@redhat.com>
14 Signed-off-by: Coly Li <coly.li@suse.de>
16 diff --git a/fs/dlm/ast.c b/fs/dlm/ast.c
17 index fbe840d..dc2ad60 100644
20 @@ -61,30 +61,23 @@ static void process_asts(void)
22 void (*cast) (void *astparam);
23 void (*bast) (void *astparam, int mode);
24 - int type = 0, found, bastmode;
28 - spin_lock(&ast_queue_lock);
29 - list_for_each_entry(lkb, &ast_queue, lkb_astqueue) {
30 - r = lkb->lkb_resource;
33 - if (dlm_locking_stopped(ls))
36 - list_del(&lkb->lkb_astqueue);
37 - type = lkb->lkb_ast_type;
38 - lkb->lkb_ast_type = 0;
39 - bastmode = lkb->lkb_bastmode;
43 - spin_unlock(&ast_queue_lock);
44 + int type = 0, bastmode;
47 + spin_lock(&ast_queue_lock);
48 + list_for_each_entry(lkb, &ast_queue, lkb_astqueue) {
49 + r = lkb->lkb_resource;
54 + if (dlm_locking_stopped(ls))
57 + list_del(&lkb->lkb_astqueue);
58 + type = lkb->lkb_ast_type;
59 + lkb->lkb_ast_type = 0;
60 + bastmode = lkb->lkb_bastmode;
62 + spin_unlock(&ast_queue_lock);
63 cast = lkb->lkb_astfn;
64 bast = lkb->lkb_bastfn;
66 @@ -99,7 +92,9 @@ static void process_asts(void)
72 + spin_unlock(&ast_queue_lock);
75 static inline int no_asts(void)