diff options
author | David Teigland <teigland@redhat.com> | 2009-02-27 16:23:28 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2009-03-11 13:23:58 -0400 |
commit | a536e38125fe5da8ed49690f30c30a8f651cf1f5 (patch) | |
tree | c63ef3e58e10fbe23366ba557ceca00f69def547 /fs | |
parent | 43279e5376017c40b4be9af5bc79cbb4ef6f53d7 (diff) |
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 <teigland@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | 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 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) | |||
2186 | goto out; | 2186 | goto out; |
2187 | } | 2187 | } |
2188 | 2188 | ||
2189 | /* there's nothing to cancel */ | ||
2190 | if (lkb->lkb_status == DLM_LKSTS_GRANTED && | ||
2191 | !lkb->lkb_wait_type) { | ||
2192 | rv = -EBUSY; | ||
2193 | goto out; | ||
2194 | } | ||
2195 | |||
2189 | switch (lkb->lkb_wait_type) { | 2196 | switch (lkb->lkb_wait_type) { |
2190 | case DLM_MSG_LOOKUP: | 2197 | case DLM_MSG_LOOKUP: |
2191 | case DLM_MSG_REQUEST: | 2198 | case DLM_MSG_REQUEST: |