[DLM] fix requestqueue race
authorDavid Teigland <teigland@redhat.com>
Tue, 31 Oct 2006 17:55:56 +0000 (11:55 -0600)
committerSteven Whitehouse <swhiteho@redhat.com>
Thu, 30 Nov 2006 15:35:10 +0000 (10:35 -0500)
Red Hat BZ 211914

There's a race between dlm_recoverd (1) enabling locking and (2) clearing
out the requestqueue, and dlm_recvd (1) checking if locking is enabled and
(2) adding a message to the requestqueue.  An order of recoverd(1),
recvd(1), recvd(2), recoverd(2) will result in a message being left on the
requestqueue.  The fix is to have dlm_recvd check if dlm_recoverd has
enabled locking after taking the mutex for the requestqueue and if it has
processing the message instead of queueing it.

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

diff --cc fs/dlm/lock.c
Simple merge
Simple merge
Simple merge