Skip to content

Commit

Permalink
dlm: ignore cancel on granted lock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Teigland committed Mar 11, 2009
1 parent 43279e5 commit a536e38
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fs/dlm/lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a536e38

Please sign in to comment.