Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 722d7421 authored by Andrew Morton's avatar Andrew Morton Committed by David Teigland
Browse files

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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent d022509d
Loading
Loading
Loading
Loading
+17 −22
Original line number Diff line number Diff line
@@ -61,10 +61,9 @@ static void process_asts(void)
	struct dlm_lkb *lkb;
	void (*cast) (void *astparam);
	void (*bast) (void *astparam, int mode);
	int type = 0, found, bastmode;
	int type = 0, bastmode;

	for (;;) {
		found = 0;
repeat:
	spin_lock(&ast_queue_lock);
	list_for_each_entry(lkb, &ast_queue, lkb_astqueue) {
		r = lkb->lkb_resource;
@@ -77,14 +76,8 @@ static void process_asts(void)
		type = lkb->lkb_ast_type;
		lkb->lkb_ast_type = 0;
		bastmode = lkb->lkb_bastmode;
			found = 1;
			break;
		}
		spin_unlock(&ast_queue_lock);

		if (!found)
			break;

		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)