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>

authored by

Andrew Morton and committed by
David Teigland
722d7421 d022509d

+15 -20
+15 -20
fs/dlm/ast.c
··· 61 61 struct dlm_lkb *lkb; 62 62 void (*cast) (void *astparam); 63 63 void (*bast) (void *astparam, int mode); 64 - int type = 0, found, bastmode; 64 + int type = 0, bastmode; 65 65 66 - for (;;) { 67 - found = 0; 68 - spin_lock(&ast_queue_lock); 69 - list_for_each_entry(lkb, &ast_queue, lkb_astqueue) { 70 - r = lkb->lkb_resource; 71 - ls = r->res_ls; 66 + repeat: 67 + spin_lock(&ast_queue_lock); 68 + list_for_each_entry(lkb, &ast_queue, lkb_astqueue) { 69 + r = lkb->lkb_resource; 70 + ls = r->res_ls; 72 71 73 - if (dlm_locking_stopped(ls)) 74 - continue; 72 + if (dlm_locking_stopped(ls)) 73 + continue; 75 74 76 - list_del(&lkb->lkb_astqueue); 77 - type = lkb->lkb_ast_type; 78 - lkb->lkb_ast_type = 0; 79 - bastmode = lkb->lkb_bastmode; 80 - found = 1; 81 - break; 82 - } 75 + list_del(&lkb->lkb_astqueue); 76 + type = lkb->lkb_ast_type; 77 + lkb->lkb_ast_type = 0; 78 + bastmode = lkb->lkb_bastmode; 79 + 83 80 spin_unlock(&ast_queue_lock); 84 - 85 - if (!found) 86 - break; 87 - 88 81 cast = lkb->lkb_astfn; 89 82 bast = lkb->lkb_bastfn; 90 83 ··· 92 99 dlm_put_lkb(lkb); 93 100 94 101 cond_resched(); 102 + goto repeat; 95 103 } 104 + spin_unlock(&ast_queue_lock); 96 105 } 97 106 98 107 static inline int no_asts(void)