dlm: bz#251179 Fix lowcomms socket closing
PATCH 1/1 dlm: bz#251179 Fix lowcomms socket closing
This patch fixes the slight mess made in lowcomms closing by previous patches and fixes all sorts of DLM hangs.
Signed-off-by Patrick Caulfield <[email protected]>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lowcomms-close-patch.stevew
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070820/8f8a2e1e/attachment.ksh>
PATCH 1/1 dlm: bz#251179 Fix lowcomms socket closing
Hi,
Now in the -nmw git tree. Thanks,
Steve.
Quoted 38 lines · Patrick Caulfield
This patch fixes the slight mess made in lowcomms closing by previous patches and fixes all sorts of DLM hangs.
Signed-off-by Patrick Caulfield <[email protected]>plain text document attachment (lowcomms-close-patch.stevew)
fs/dlm/lowcomms.c renamed from fs/dlm/lowcomms.c.orig +4
-12@@ -334,18 +334,8 @@ static void close_connection(struct conn con->rx_page =NULL ; } -/* If we are an 'othercon' then NULL the pointer to us -from the parent and tidy ourself up */ -if (test_bit (CF_IS_OTHERCON , &con->flags)) { -struct connection *parent =__nodeid2con (con->nodeid,0 ); - parent->othercon =NULL ; -kmem_cache_free (con_cache, con); - } -else { -/* Parent connections get reused */ - con->retries =0 ; -mutex_unlock (&con->sock_mutex); - } + con->retries =0 ; +mutex_unlock (&con->sock_mutex); }/* We only send shutdown messages to nodes that are not part of the cluster */ @@ -731,6 +721,8 @@ static int tcp_accept_from_sock(struct cINIT_WORK (&othercon->swork, process_send_sockets);INIT_WORK (&othercon->rwork, process_recv_sockets);set_bit (CF_IS_OTHERCON , &othercon->flags); + } +if (!othercon->sock) { newcon->othercon = othercon; othercon->sock = newsock; newsock->sk->sk_user_data = othercon;