Commit d7889cfa authored by Geliang Tang's avatar Geliang Tang Committed by David S. Miller
Browse files

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: default avatarGeliang Tang <geliang.tang@suse.com>
Signed-off-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 156a532b
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -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;

	if (unlikely(OPTION_MPTCP_FAIL & opts->suboptions)) {
		subflow = mptcp_subflow_ctx(ssk);
		subflow->send_mp_fail = 0;

@@ -1489,9 +1489,6 @@ void mptcp_write_options(__be32 *ptr, const struct tcp_sock *tp,
	}

	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;