mirror of https://gitee.com/openkylin/linux.git
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:
parent
40947e1399
commit
b263b0d7d6
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue