]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.suse/dlm-ignore-cancel-on-granted-lock.patch
Updated xen patches taken from suse.
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.suse / dlm-ignore-cancel-on-granted-lock.patch
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
6
7 Return immediately from dlm_unlock(CANCEL) if the lock is
8 granted and not being converted; there's nothing to cancel.
9
10 Signed-off-by: David Teigland <teigland@redhat.com>
11 Signed-off-by: Coly Li <coly.li@suse.de>
12
13 diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
14 index 8cb9204..205ec95 100644
15 --- a/fs/dlm/lock.c
16 +++ b/fs/dlm/lock.c
17 @@ -2186,6 +2186,13 @@ static int validate_unlock_args(struct dlm_lkb *lkb, struct dlm_args *args)
18 goto out;
19 }
20
21 + /* there's nothing to cancel */
22 + if (lkb->lkb_status == DLM_LKSTS_GRANTED &&
23 + !lkb->lkb_wait_type) {
24 + rv = -EBUSY;
25 + goto out;
26 + }
27 +
28 switch (lkb->lkb_wait_type) {
29 case DLM_MSG_LOOKUP:
30 case DLM_MSG_REQUEST: