diff options
author | Patrick Caulfield <pcaulfie@redhat.com> | 2007-08-20 10:13:38 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2007-10-10 03:55:39 -0400 |
commit | 61d96be0f474df354c2ff4a2b2bf410b23a5cd60 (patch) | |
tree | b40a06b75f7ff59b3925dcabbbf63605f7b18c18 /fs/dlm | |
parent | a13b8c5f2381495879e6facd3b3ada51c9e68194 (diff) |
[DLM] 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 <pcaulfie@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r-- | fs/dlm/lowcomms.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 9e9d2e82f40f..62a8a6ccd992 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c | |||
@@ -334,18 +334,8 @@ static void close_connection(struct connection *con, bool and_other) | |||
334 | con->rx_page = NULL; | 334 | con->rx_page = NULL; |
335 | } | 335 | } |
336 | 336 | ||
337 | /* If we are an 'othercon' then NULL the pointer to us | 337 | con->retries = 0; |
338 | from the parent and tidy ourself up */ | 338 | mutex_unlock(&con->sock_mutex); |
339 | if (test_bit(CF_IS_OTHERCON, &con->flags)) { | ||
340 | struct connection *parent = __nodeid2con(con->nodeid, 0); | ||
341 | parent->othercon = NULL; | ||
342 | kmem_cache_free(con_cache, con); | ||
343 | } | ||
344 | else { | ||
345 | /* Parent connections get reused */ | ||
346 | con->retries = 0; | ||
347 | mutex_unlock(&con->sock_mutex); | ||
348 | } | ||
349 | } | 339 | } |
350 | 340 | ||
351 | /* We only send shutdown messages to nodes that are not part of the cluster */ | 341 | /* 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 connection *con) | |||
731 | INIT_WORK(&othercon->swork, process_send_sockets); | 721 | INIT_WORK(&othercon->swork, process_send_sockets); |
732 | INIT_WORK(&othercon->rwork, process_recv_sockets); | 722 | INIT_WORK(&othercon->rwork, process_recv_sockets); |
733 | set_bit(CF_IS_OTHERCON, &othercon->flags); | 723 | set_bit(CF_IS_OTHERCON, &othercon->flags); |
724 | } | ||
725 | if (!othercon->sock) { | ||
734 | newcon->othercon = othercon; | 726 | newcon->othercon = othercon; |
735 | othercon->sock = newsock; | 727 | othercon->sock = newsock; |
736 | newsock->sk->sk_user_data = othercon; | 728 | newsock->sk->sk_user_data = othercon; |