mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Mat Martineau <mathew.j.martineau@linux.intel.com>
To: netdev@vger.kernel.org
Cc: Geliang Tang <geliangtang@gmail.com>,
	davem@davemloft.net, kuba@kernel.org,
	matthieu.baerts@tessares.net, mptcp@lists.linux.dev,
	Mat Martineau <mathew.j.martineau@linux.intel.com>
Subject: [PATCH net-next 8/8] mptcp: use mptcp_for_each_subflow in mptcp_close
Date: Fri, 16 Apr 2021 15:38:08 -0700	[thread overview]
Message-ID: <20210416223808.298842-9-mathew.j.martineau@linux.intel.com> (raw)
In-Reply-To: <20210416223808.298842-1-mathew.j.martineau@linux.intel.com>

From: Geliang Tang <geliangtang@gmail.com>

This patch used the macro helper mptcp_for_each_subflow() instead of
list_for_each_entry() in mptcp_close.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
---
 net/mptcp/protocol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index e26ea143754d..c14ac2975736 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -2611,7 +2611,7 @@ static void mptcp_close(struct sock *sk, long timeout)
 cleanup:
 	/* orphan all the subflows */
 	inet_csk(sk)->icsk_mtup.probe_timestamp = tcp_jiffies32;
-	list_for_each_entry(subflow, &mptcp_sk(sk)->conn_list, node) {
+	mptcp_for_each_subflow(mptcp_sk(sk), subflow) {
 		struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
 		bool slow = lock_sock_fast(ssk);
 
-- 
2.31.1


  parent reply	other threads:[~2021-04-16 22:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-16 22:38 [PATCH net-next 0/8] mptcp: Fixes and tracepoints from the mptcp tree Mat Martineau
2021-04-16 22:38 ` [PATCH net-next 1/8] kunit: mptcp: adhere to KUNIT formatting standard Mat Martineau
2021-04-16 22:38 ` [PATCH net-next 2/8] mptcp: fix format specifiers for unsigned int Mat Martineau
2021-04-16 22:38 ` [PATCH net-next 3/8] mptcp: export mptcp_subflow_active Mat Martineau
2021-04-16 22:38 ` [PATCH net-next 4/8] mptcp: add tracepoint in mptcp_subflow_get_send Mat Martineau
2021-04-16 22:38 ` [PATCH net-next 5/8] mptcp: add tracepoint in get_mapping_status Mat Martineau
2021-04-16 22:38 ` [PATCH net-next 6/8] mptcp: add tracepoint in ack_update_msk Mat Martineau
2021-04-16 22:38 ` [PATCH net-next 7/8] mptcp: add tracepoint in subflow_check_data_avail Mat Martineau
2021-04-16 22:38 ` Mat Martineau [this message]
2021-04-17  0:20 ` [PATCH net-next 0/8] mptcp: Fixes and tracepoints from the mptcp tree patchwork-bot+netdevbpf

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=20210416223808.298842-9-mathew.j.martineau@linux.intel.com \
    --to=mathew.j.martineau@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=geliangtang@gmail.com \
    --cc=kuba@kernel.org \
    --cc=matthieu.baerts@tessares.net \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    /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).