diff options
author | David Teigland <teigland@redhat.com> | 2008-05-20 13:18:10 -0400 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2008-07-14 14:56:59 -0400 |
commit | 329fc4c37212588091b64bdf09afaeb18642aae2 (patch) | |
tree | 1df9d0ed055afb2f46669142472f7c88554a93bc /fs/dlm/lock.c | |
parent | 254ae43ab8d7877c980fca3636624e0777a70fa4 (diff) |
dlm: fix basts for granted CW waiting PR/CW
The fix in commit 3650925893469ccb03dbcc6a440c5d363350f591 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: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/lock.c')
-rw-r--r-- | fs/dlm/lock.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 2d3d1027ce2b..7ba9586a0943 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c | |||
@@ -1782,7 +1782,8 @@ static void grant_pending_locks(struct dlm_rsb *r) | |||
1782 | 1782 | ||
1783 | list_for_each_entry_safe(lkb, s, &r->res_grantqueue, lkb_statequeue) { | 1783 | list_for_each_entry_safe(lkb, s, &r->res_grantqueue, lkb_statequeue) { |
1784 | if (lkb->lkb_bastfn && lock_requires_bast(lkb, high, cw)) { | 1784 | if (lkb->lkb_bastfn && lock_requires_bast(lkb, high, cw)) { |
1785 | if (cw && high == DLM_LOCK_PR) | 1785 | if (cw && high == DLM_LOCK_PR && |
1786 | lkb->lkb_grmode == DLM_LOCK_PR) | ||
1786 | queue_bast(r, lkb, DLM_LOCK_CW); | 1787 | queue_bast(r, lkb, DLM_LOCK_CW); |
1787 | else | 1788 | else |
1788 | queue_bast(r, lkb, high); | 1789 | queue_bast(r, lkb, high); |