diff options
author | Paolo Abeni <pabeni@redhat.com> | 2020-11-27 11:10:26 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-30 17:55:23 -0800 |
commit | 7439d687b79cbbd971c6a170be9aefda4a564be4 (patch) | |
tree | 0c3bf91c5429a40d22f78ec7aaa75e052370fd29 /net/mptcp/mptcp_diag.c | |
parent | 724cfd2ee8aa12e933253bb7a8bccb743a6fa6ef (diff) | |
download | lwn-7439d687b79cbbd971c6a170be9aefda4a564be4.tar.gz lwn-7439d687b79cbbd971c6a170be9aefda4a564be4.zip |
mptcp: avoid a few atomic ops in the rx path
Extending the data_lock scope in mptcp_incoming_option
we can use that to protect both snd_una and wnd_end.
In the typical case, we will have a single atomic op instead of 2
Acked-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/mptcp_diag.c')
-rw-r--r-- | net/mptcp/mptcp_diag.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mptcp/mptcp_diag.c b/net/mptcp/mptcp_diag.c index 5f390a97f556..b70ae4ba3000 100644 --- a/net/mptcp/mptcp_diag.c +++ b/net/mptcp/mptcp_diag.c @@ -140,7 +140,7 @@ static void mptcp_diag_get_info(struct sock *sk, struct inet_diag_msg *r, info->mptcpi_flags = flags; info->mptcpi_token = READ_ONCE(msk->token); info->mptcpi_write_seq = READ_ONCE(msk->write_seq); - info->mptcpi_snd_una = atomic64_read(&msk->snd_una); + info->mptcpi_snd_una = READ_ONCE(msk->snd_una); info->mptcpi_rcv_nxt = READ_ONCE(msk->ack_seq); unlock_sock_fast(sk, slow); } |