From: David Teigland Date: Fri, 27 Feb 2009 21:23:28 +0000 (-0600) Subject: dlm: ignore cancel on granted lock X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a536e38125fe5da8ed49690f30c30a8f651cf1f5;p=linux-beck.git dlm: ignore cancel on granted lock 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 --- diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 8cb92046a584..205ec95b347e 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: