[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>
This commit is contained in:
parent
a13b8c5f23
commit
61d96be0f4
|
@ -334,19 +334,9 @@ static void close_connection(struct connection *con, bool and_other)
|
||||||
con->rx_page = NULL;
|
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;
|
con->retries = 0;
|
||||||
mutex_unlock(&con->sock_mutex);
|
mutex_unlock(&con->sock_mutex);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* We only send shutdown messages to nodes that are not part of the cluster */
|
/* We only send shutdown messages to nodes that are not part of the cluster */
|
||||||
static void sctp_send_shutdown(sctp_assoc_t associd)
|
static void sctp_send_shutdown(sctp_assoc_t associd)
|
||||||
|
@ -731,6 +721,8 @@ static int tcp_accept_from_sock(struct connection *con)
|
||||||
INIT_WORK(&othercon->swork, process_send_sockets);
|
INIT_WORK(&othercon->swork, process_send_sockets);
|
||||||
INIT_WORK(&othercon->rwork, process_recv_sockets);
|
INIT_WORK(&othercon->rwork, process_recv_sockets);
|
||||||
set_bit(CF_IS_OTHERCON, &othercon->flags);
|
set_bit(CF_IS_OTHERCON, &othercon->flags);
|
||||||
|
}
|
||||||
|
if (!othercon->sock) {
|
||||||
newcon->othercon = othercon;
|
newcon->othercon = othercon;
|
||||||
othercon->sock = newsock;
|
othercon->sock = newsock;
|
||||||
newsock->sk->sk_user_data = othercon;
|
newsock->sk->sk_user_data = othercon;
|
||||||
|
|
Loading…
Reference in a new issue