From 2bf439a2b30f5026e28da753edc2a9bf092661ee Mon Sep 17 00:00:00 2001 From: David Teigland Date: Fri, 27 Feb 2009 15:23:28 -0600 Subject: [PATCH] --- yaml --- r: 135890 b: refs/heads/master c: a536e38125fe5da8ed49690f30c30a8f651cf1f5 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/dlm/lock.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index abdec9ecbf0f..7bfe741bec80 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 43279e5376017c40b4be9af5bc79cbb4ef6f53d7 +refs/heads/master: a536e38125fe5da8ed49690f30c30a8f651cf1f5 diff --git a/trunk/fs/dlm/lock.c b/trunk/fs/dlm/lock.c index 8cb92046a584..205ec95b347e 100644 --- a/trunk/fs/dlm/lock.c +++ b/trunk/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: