diff options
author | Geliang Tang <geliang.tang@linux.dev> | 2023-12-22 13:47:23 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-01-02 14:33:33 +0100 |
commit | c693a8516429908da3ea111b0caa3c042ab1e6e9 (patch) | |
tree | e6e3358ab8e5e89413b9594e57ba3734ab1bb601 /net/mptcp/pm_netlink.c | |
parent | mptcp: add CurrEstab MIB counter support (diff) | |
download | linux-c693a8516429908da3ea111b0caa3c042ab1e6e9.tar.xz linux-c693a8516429908da3ea111b0caa3c042ab1e6e9.zip |
mptcp: use mptcp_set_state
This patch replaces all the 'inet_sk_state_store()' calls under net/mptcp
with the new helper mptcp_set_state().
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/460
Signed-off-by: Geliang Tang <geliang.tang@linux.dev>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/pm_netlink.c')
-rw-r--r-- | net/mptcp/pm_netlink.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index 272e93be1aad..287a60381eae 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -1048,6 +1048,11 @@ static int mptcp_pm_nl_create_listen_socket(struct sock *sk, if (err) return err; + /* We don't use mptcp_set_state() here because it needs to be called + * under the msk socket lock. For the moment, that will not bring + * anything more than only calling inet_sk_state_store(), because the + * old status is known (TCP_CLOSE). + */ inet_sk_state_store(newsk, TCP_LISTEN); lock_sock(ssk); err = __inet_listen_sk(ssk, backlog); |