public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [patch 09/12] dlm: clear NEW_MASTER flag
Date: Fri, 15 Jul 2005 18:37:02 +0800	[thread overview]
Message-ID: <20050715103702.GL17316@redhat.com> (raw)

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

--

                 reply	other threads:[~2005-07-15 10:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050715103702.GL17316@redhat.com \
    --to=teigland@redhat.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox