public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 09/12] dlm: clear NEW_MASTER flag
@ 2005-07-15 10:37 David Teigland
  0 siblings, 0 replies; only message in thread
From: David Teigland @ 2005-07-15 10:37 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

[-- Attachment #1: clear-new-master.patch --]
[-- Type: text/plain, Size: 869 bytes --]

If recover_locks() on an rsb doesn't find any locks to recover, we need to
clear the NEW_MASTER flag since it won't be cleared by
dlm_recovered_lock().

Signed-off-by: David Teigland <teigland@redhat.com>

Index: linux/drivers/dlm/recover.c
===================================================================
--- linux.orig/drivers/dlm/recover.c
+++ linux/drivers/dlm/recover.c
@@ -502,6 +502,8 @@ static int recover_locks(struct dlm_rsb 
 
 	if (r->res_recover_locks_count)
 		recover_list_add(r);
+	else
+		rsb_clear_flag(r, RSB_NEW_MASTER);
  out:
 	unlock_rsb(r);
 	return error;
@@ -553,6 +555,8 @@ int dlm_recover_locks(struct dlm_ls *ls)
 
 void dlm_recovered_lock(struct dlm_rsb *r)
 {
+	DLM_ASSERT(rsb_flag(r, RSB_NEW_MASTER), dlm_print_rsb(r););
+
 	r->res_recover_locks_count--;
 	if (!r->res_recover_locks_count) {
 		rsb_clear_flag(r, RSB_NEW_MASTER);

--

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-15 10:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-15 10:37 [patch 09/12] dlm: clear NEW_MASTER flag David Teigland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox