DLM: Eliminate CF_CONNECT_PENDING flag
authorBob Peterson <rpeterso@redhat.com>
Tue, 12 Sep 2017 08:55:04 +0000 (08:55 +0000)
committerDavid Teigland <teigland@redhat.com>
Mon, 25 Sep 2017 17:45:21 +0000 (12:45 -0500)
commit61d9102b62129e13a2258c1e0566962f9a1732f0
tree94f017d688925ebecfd3da5e96735c2f55af1eaf
parente19b205be43d11bff638cad4487008c48d21c103
DLM: Eliminate CF_CONNECT_PENDING flag

Before this patch, there was a flag in the con structure that was
used to determine whether or not a connect was needed. The bit was
set here and there, and cleared here and there, so it left some
race conditions: the bit was set, work was queued, then the worker
cleared the bit, allowing someone else to set it while the worker
ran. For the most part, this worked okay, but we got into trouble
if connections were lost and it needed to reconnect.

This patch eliminates the flag in favor of simply checking if we
actually have a sock pointer while protected by the mutex.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Reviewed-by: Tadashi Miyauchi <miyauchi@toshiba-tops.co.jp>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lowcomms.c