mptcp: avoid additional __inet_stream_connect() call
authorPaolo Abeni <pabeni@redhat.com>
Fri, 11 Aug 2023 15:57:15 +0000 (17:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Aug 2023 06:06:13 +0000 (07:06 +0100)
commitccae357c1c6a76c3b46f12ae18d7679d871c9390
tree1645558986b58872cdaeeda2901e11e3ad98d38c
parent131a627751e3474bc8e33009c032feecfe8d879f
mptcp: avoid additional __inet_stream_connect() call

The mptcp protocol maintains an additional socket just to easily
invoke a few stream operations on the first subflow. One of them is
__inet_stream_connect().

We are going to remove the first subflow socket soon, so avoid
the additional indirection via at connect time, calling directly
into the sock-level connect() ops.

The sk-level connect never return -EINPROGRESS, cleanup the error
path accordingly. Additionally, the ssk status on error is always
TCP_CLOSE. Avoid unneeded access to the subflow sk state.

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/protocol.c