Cluster-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 6/7] dlm: ignore cancel on granted lock
@ 2009-03-24 14:11 David Teigland
  0 siblings, 0 replies; only message in thread
From: David Teigland @ 2009-03-24 14:11 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Return immediately from dlm_unlock(CANCEL) if the lock is
granted and not being converted; there's nothing to cancel.

Signed-off-by: David Teigland <teigland@redhat.com>
---
 fs/dlm/lock.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 8cb9204..205ec95 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -2186,6 +2186,13 @@ static int validate_unlock_args(struct dlm_lkb *lkb, struct dlm_args *args)
 			goto out;
 		}
 
+		/* there's nothing to cancel */
+		if (lkb->lkb_status == DLM_LKSTS_GRANTED &&
+		    !lkb->lkb_wait_type) {
+			rv = -EBUSY;
+			goto out;
+		}
+
 		switch (lkb->lkb_wait_type) {
 		case DLM_MSG_LOOKUP:
 		case DLM_MSG_REQUEST:
-- 
1.5.5.6



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

only message in thread, other threads:[~2009-03-24 14:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-24 14:11 [Cluster-devel] [PATCH 6/7] dlm: ignore cancel on granted lock David Teigland

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