diff options
author | David Teigland <teigland@redhat.com> | 2009-02-27 15:23:28 -0600 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2009-03-11 12:23:58 -0500 |
commit | a536e38125fe5da8ed49690f30c30a8f651cf1f5 (patch) | |
tree | c63ef3e58e10fbe23366ba557ceca00f69def547 /fs/dlm | |
parent | 43279e5376017c40b4be9af5bc79cbb4ef6f53d7 (diff) | |
download | linux-exynos-a536e38125fe5da8ed49690f30c30a8f651cf1f5.tar.gz linux-exynos-a536e38125fe5da8ed49690f30c30a8f651cf1f5.tar.bz2 linux-exynos-a536e38125fe5da8ed49690f30c30a8f651cf1f5.zip |
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/dlm')
-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) 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: |