mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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>
This commit is contained in:
parent
d022509d1c
commit
722d74219e
1 changed files with 15 additions and 20 deletions
35
fs/dlm/ast.c
35
fs/dlm/ast.c
|
@ -61,30 +61,23 @@ static void process_asts(void)
|
||||||
struct dlm_lkb *lkb;
|
struct dlm_lkb *lkb;
|
||||||
void (*cast) (void *astparam);
|
void (*cast) (void *astparam);
|
||||||
void (*bast) (void *astparam, int mode);
|
void (*bast) (void *astparam, int mode);
|
||||||
int type = 0, found, bastmode;
|
int type = 0, bastmode;
|
||||||
|
|
||||||
for (;;) {
|
repeat:
|
||||||
found = 0;
|
spin_lock(&ast_queue_lock);
|
||||||
spin_lock(&ast_queue_lock);
|
list_for_each_entry(lkb, &ast_queue, lkb_astqueue) {
|
||||||
list_for_each_entry(lkb, &ast_queue, lkb_astqueue) {
|
r = lkb->lkb_resource;
|
||||||
r = lkb->lkb_resource;
|
ls = r->res_ls;
|
||||||
ls = r->res_ls;
|
|
||||||
|
|
||||||
if (dlm_locking_stopped(ls))
|
if (dlm_locking_stopped(ls))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
list_del(&lkb->lkb_astqueue);
|
||||||
|
type = lkb->lkb_ast_type;
|
||||||
|
lkb->lkb_ast_type = 0;
|
||||||
|
bastmode = lkb->lkb_bastmode;
|
||||||
|
|
||||||
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);
|
spin_unlock(&ast_queue_lock);
|
||||||
|
|
||||||
if (!found)
|
|
||||||
break;
|
|
||||||
|
|
||||||
cast = lkb->lkb_astfn;
|
cast = lkb->lkb_astfn;
|
||||||
bast = lkb->lkb_bastfn;
|
bast = lkb->lkb_bastfn;
|
||||||
|
|
||||||
|
@ -99,7 +92,9 @@ static void process_asts(void)
|
||||||
dlm_put_lkb(lkb);
|
dlm_put_lkb(lkb);
|
||||||
|
|
||||||
cond_resched();
|
cond_resched();
|
||||||
|
goto repeat;
|
||||||
}
|
}
|
||||||
|
spin_unlock(&ast_queue_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int no_asts(void)
|
static inline int no_asts(void)
|
||||||
|
|
Loading…
Reference in a new issue