1 From: David Teigland <teigland@redhat.com>
2 commit a536e38125fe5da8ed49690f30c30a8f651cf1f5
3 Author: David Teigland <teigland@redhat.com>
4 Date: Fri Feb 27 15:23:28 2009 -0600
5 Subject: dlm: ignore cancel on granted lock
7 Return immediately from dlm_unlock(CANCEL) if the lock is
8 granted and not being converted; there's nothing to cancel.
10 Signed-off-by: David Teigland <teigland@redhat.com>
11 Signed-off-by: Coly Li <coly.li@suse.de>
13 diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
14 index 8cb9204..205ec95 100644
17 @@ -2186,6 +2186,13 @@ static int validate_unlock_args(struct dlm_lkb *lkb, struct dlm_args *args)
21 + /* there's nothing to cancel */
22 + if (lkb->lkb_status == DLM_LKSTS_GRANTED &&
23 + !lkb->lkb_wait_type) {
28 switch (lkb->lkb_wait_type) {