[patch 09/12] dlm: clear NEW_MASTER flag

2005-07-15 Thread David Teigland
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 <[EMAIL PROTECTED]>

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);

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[patch 09/12] dlm: clear NEW_MASTER flag

2005-07-15 Thread David Teigland
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 [EMAIL PROTECTED]

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);

--
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/