Commit 329fc4c3 authored by David Teigland's avatar David Teigland

dlm: fix basts for granted CW waiting PR/CW

The fix in commit 36509258 was addressing
the case of a granted PR lock with waiting PR and CW locks.  It's a
special case that requires forcing a CW bast.  However, that forced CW
bast was incorrectly applying to a second condition where the granted
lock was CW.  So, the holder of a CW lock could receive an extraneous CW
bast instead of a PR bast.  This fix narrows the original special case to
what was intended.
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent 254ae43a
...@@ -1782,7 +1782,8 @@ static void grant_pending_locks(struct dlm_rsb *r) ...@@ -1782,7 +1782,8 @@ static void grant_pending_locks(struct dlm_rsb *r)
list_for_each_entry_safe(lkb, s, &r->res_grantqueue, lkb_statequeue) { list_for_each_entry_safe(lkb, s, &r->res_grantqueue, lkb_statequeue) {
if (lkb->lkb_bastfn && lock_requires_bast(lkb, high, cw)) { if (lkb->lkb_bastfn && lock_requires_bast(lkb, high, cw)) {
if (cw && high == DLM_LOCK_PR) if (cw && high == DLM_LOCK_PR &&
lkb->lkb_grmode == DLM_LOCK_PR)
queue_bast(r, lkb, DLM_LOCK_CW); queue_bast(r, lkb, DLM_LOCK_CW);
else else
queue_bast(r, lkb, high); queue_bast(r, lkb, high);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment