From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Thu, 20 Apr 2017 16:02:20 -0400 (EDT) Subject: [Cluster-devel] DLM: Do not count redundant connection attempts against retries Message-ID: <483789947.17531984.1492718540635.JavaMail.zimbra@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Before this patch, multiple GFS2 mounts would result in multiple connection attempts. They were all ignored, and rightly so, but they were being counted against the connection attempt retries. This patch moves the retry check later those redundant attempts are simply ignored, as they should be. Signed-off-by: Bob Peterson --- diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 7d398d3..42c8457 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -1123,13 +1123,13 @@ static void tcp_connect_to_sock(struct connection *con) } mutex_lock(&con->sock_mutex); - if (con->retries++ > MAX_CONNECT_RETRIES) - goto out; - /* Some odd races can cause double-connects, ignore them */ if (con->sock) goto out; + if (con->retries++ > MAX_CONNECT_RETRIES) + goto out; + /* Create a socket to communicate with */ result = sock_create_kern(&init_net, dlm_local_addr[0]->ss_family, SOCK_STREAM, IPPROTO_TCP, &sock);