From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] Re: [PATCH] dlm: fix socket shutdown
Date: Mon, 04 Jun 2007 09:50:18 +0100 [thread overview]
Message-ID: <1180947018.25918.118.camel@quoit> (raw)
In-Reply-To: <20070601150726.GA31229@redhat.com>
Hi,
Now applied to the -nmw git tree. Thanks,
Steve.
On Fri, 2007-06-01 at 10:07 -0500, David Teigland wrote:
> From: Patrick Caulfield <pcaulfie@redhat.com>
>
> This patch clears the user_data of active sockets as part of cleanup.
> This prevents any late-arriving data from trying to add jobs to the work
> queue while we are tidying up.
>
> Signed-Off-By: Patrick Caulfield <pcaulfie@redhat.com>
> Signed-Off-By: David Teigland <teigland@redhat.com>
>
> Index: linux-quilt/fs/dlm/lowcomms.c
> ===================================================================
> --- linux-quilt.orig/fs/dlm/lowcomms.c 2007-05-25 14:56:42.000000000 -0500
> +++ linux-quilt/fs/dlm/lowcomms.c 2007-06-01 10:04:03.000000000 -0500
> @@ -260,7 +260,7 @@
> static void lowcomms_data_ready(struct sock *sk, int count_unused)
> {
> struct connection *con = sock2con(sk);
> - if (!test_and_set_bit(CF_READ_PENDING, &con->flags))
> + if (con && !test_and_set_bit(CF_READ_PENDING, &con->flags))
> queue_work(recv_workqueue, &con->rwork);
> }
>
> @@ -268,7 +268,7 @@
> {
> struct connection *con = sock2con(sk);
>
> - if (!test_and_set_bit(CF_WRITE_PENDING, &con->flags))
> + if (con && !test_and_set_bit(CF_WRITE_PENDING, &con->flags))
> queue_work(send_workqueue, &con->swork);
> }
>
> @@ -1400,8 +1400,11 @@
> down(&connections_lock);
> for (i = 0; i <= max_nodeid; i++) {
> con = __nodeid2con(i, 0);
> - if (con)
> + if (con) {
> con->flags |= 0xFF;
> + if (con->sock)
> + con->sock->sk->sk_user_data = NULL;
> + }
> }
> up(&connections_lock);
>
prev parent reply other threads:[~2007-06-04 8:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-01 15:07 [Cluster-devel] [PATCH] dlm: fix socket shutdown David Teigland
2007-06-04 8:50 ` Steven Whitehouse [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1180947018.25918.118.camel@quoit \
--to=swhiteho@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).