mptcp: change the mpc check helper to return a sk
authorPaolo Abeni <pabeni@redhat.com>
Fri, 11 Aug 2023 15:57:25 +0000 (17:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Aug 2023 06:06:14 +0000 (07:06 +0100)
commit3f326a821b99812edb6d3c24bcb78377cae6e432
treef131a977699c42f29f12f0b314e8a73ec9137989
parent3aa362494170142406228e45860d6f4e48595d54
mptcp: change the mpc check helper to return a sk

After the previous patch the __mptcp_nmpc_socket helper is used
only to ensure that the MPTCP socket is a suitable status - that
is, the mptcp capable handshake is not started yet.

Change the return value to the relevant subflow sock, to finally
remove the last references to first subflow socket in the MPTCP stack.

As a bonus, we can get rid of a few local variables in different
functions.

No functional change intended.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/pm_netlink.c
net/mptcp/protocol.c
net/mptcp/protocol.h
net/mptcp/sockopt.c