]> git.baikalelectronics.ru Git - kernel.git/commit
[DLM] fix basts for granted PR waiting CW
authorDavid Teigland <teigland@redhat.com>
Tue, 7 Aug 2007 14:44:48 +0000 (09:44 -0500)
committerSteven Whitehouse <swhiteho@redhat.com>
Tue, 14 Aug 2007 09:31:02 +0000 (10:31 +0100)
commit790544180769bbe7c017e12b94770a04c92ee0db
tree8f0b9d6ce880547723cb6590c27799821b9c2f96
parent650a9e1406a19e836850e59903d8e2df248783af
[DLM] fix basts for granted PR waiting CW

Fix a long standing bug where a blocking callback would be missed
when there's a granted lock in PR mode and waiting locks in both
PR and CW modes (and the PR lock was added to the waiting queue
before the CW lock).  The logic simply compared the numerical values
of the modes to determine if a blocking callback was required, but in
the one case of PR and CW, the lower valued CW mode blocks the higher
valued PR mode.  We just need to add a special check for this PR/CW
case in the tests that decide when a blocking callback is needed.

Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/dlm/lock.c