mptcp: move subflow close loop after sk close check

In case mptcp socket is already dead the entire mptcp socket
will be freed. We can avoid the close check in this case.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Florian Westphal 2021-02-12 15:59:57 -08:00 committed by David S. Miller
parent 40947e1399
commit b263b0d7d6
1 changed files with 3 additions and 3 deletions

View File

@ -2246,9 +2246,6 @@ static void mptcp_worker(struct work_struct *work)
mptcp_check_fastclose(msk);
if (test_and_clear_bit(MPTCP_WORK_CLOSE_SUBFLOW, &msk->flags))
__mptcp_close_subflow(msk);
if (msk->pm.status)
mptcp_pm_nl_work(msk);
@ -2270,6 +2267,9 @@ static void mptcp_worker(struct work_struct *work)
goto unlock;
}
if (test_and_clear_bit(MPTCP_WORK_CLOSE_SUBFLOW, &msk->flags))
__mptcp_close_subflow(msk);
if (!test_and_clear_bit(MPTCP_WORK_RTX, &msk->flags))
goto unlock;