mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-10-04 08:02:24 +00:00
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>
This commit is contained in:
parent
43279e5376
commit
a536e38125
@ -2186,6 +2186,13 @@ static int validate_unlock_args(struct dlm_lkb *lkb, struct dlm_args *args)
|
|||||||
goto out;
|
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) {
|
switch (lkb->lkb_wait_type) {
|
||||||
case DLM_MSG_LOOKUP:
|
case DLM_MSG_LOOKUP:
|
||||||
case DLM_MSG_REQUEST:
|
case DLM_MSG_REQUEST:
|
||||||
|
Loading…
Reference in New Issue
Block a user