aboutsummaryrefslogtreecommitdiff
path: root/net/mptcp
diff options
context:
space:
mode:
authorGeliang Tang2022-02-02 17:03:37 -0800
committerDavid S. Miller2022-02-03 11:44:08 +0000
commitd7889cfa0b892dfe2a44f72c866ddf41ca19f048 (patch)
treef4076f20fd300745243b4b7cc6bf3f54aaa9d8f5 /net/mptcp
parent156a532b48125896c8518a64ada2afdc05017eee (diff)
mptcp: move the declarations of ssk and subflow
Move the declarations of ssk and subflow in MP_FAIL and MP_PRIO to the beginning of the function mptcp_write_options(). 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>
Diffstat (limited to 'net/mptcp')
-rw-r--r--net/mptcp/options.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 645dd984fef0..5d0b3c3e4655 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -1264,10 +1264,10 @@ static u16 mptcp_make_csum(const struct mptcp_ext *mpext)
void mptcp_write_options(__be32 *ptr, const struct tcp_sock *tp,
struct mptcp_out_options *opts)
{
- if (unlikely(OPTION_MPTCP_FAIL & opts->suboptions)) {
- const struct sock *ssk = (const struct sock *)tp;
- struct mptcp_subflow_context *subflow;
+ const struct sock *ssk = (const struct sock *)tp;
+ struct mptcp_subflow_context *subflow;
+ if (unlikely(OPTION_MPTCP_FAIL & opts->suboptions)) {
subflow = mptcp_subflow_ctx(ssk);
subflow->send_mp_fail = 0;
@@ -1489,9 +1489,6 @@ mp_rst:
}
if (OPTION_MPTCP_PRIO & opts->suboptions) {
- const struct sock *ssk = (const struct sock *)tp;
- struct mptcp_subflow_context *subflow;
-
subflow = mptcp_subflow_ctx(ssk);
subflow->send_mp_prio = 0;