mptcp: use local variable ssk in write_options
authorGeliang Tang <geliang.tang@suse.com>
Fri, 6 Jan 2023 18:57:19 +0000 (10:57 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Jan 2023 07:30:49 +0000 (07:30 +0000)
The local variable 'ssk' has been defined at the beginning of the function
mptcp_write_options(), use it instead of getting 'ssk' again.

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/options.c

index 5ded85e..b30cea2 100644 (file)
@@ -1594,8 +1594,7 @@ mp_rst:
                                      TCPOLEN_MPTCP_PRIO,
                                      opts->backup, TCPOPT_NOP);
 
-               MPTCP_INC_STATS(sock_net((const struct sock *)tp),
-                               MPTCP_MIB_MPPRIOTX);
+               MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_MPPRIOTX);
        }
 
 mp_capable_done: