From a84529e5a97de2cdbb21c4ec8fe39f28079e3754 Mon Sep 17 00:00:00 2001 From: Geliang Tang Date: Tue, 12 Mar 2024 14:07:35 +0800 Subject: [PATCH] mptcp: drop 'first' in __mptcp_subflow_push_pending Signed-off-by: Geliang Tang --- net/mptcp/protocol.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 2468faa19b0b..018fdcf29342 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -1639,7 +1639,7 @@ void __mptcp_push_pending(struct sock *sk, unsigned int flags) mptcp_check_send_data_fin(sk); } -static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk, bool first) +static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk) { struct mptcp_sock *msk = mptcp_sk(sk); struct mptcp_sendmsg_info info = { @@ -1654,19 +1654,6 @@ static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk, bool struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk); int ret = 0; - /* check for a different subflow usage only after - * spooling the first chunk of data - */ - if (first) { - mptcp_subflow_set_scheduled(subflow, false); - ret = __subflow_push_pending(sk, ssk, &info); - first = false; - if (ret <= 0) - break; - copied += ret; - continue; - } - if (mptcp_sched_get_send(msk)) goto out; @@ -3415,7 +3402,7 @@ void __mptcp_check_push(struct sock *sk, struct sock *ssk) return; if (!sock_owned_by_user(sk)) - __mptcp_subflow_push_pending(sk, ssk, false); + __mptcp_subflow_push_pending(sk, ssk); else __set_bit(MPTCP_PUSH_PENDING, &mptcp_sk(sk)->cb_flags); } @@ -3513,7 +3500,7 @@ void mptcp_subflow_process_delegated(struct sock *ssk, long status) if (status & BIT(MPTCP_DELEGATE_SEND)) { mptcp_data_lock(sk); if (!sock_owned_by_user(sk)) - __mptcp_subflow_push_pending(sk, ssk, true); + __mptcp_subflow_push_pending(sk, ssk); else __set_bit(MPTCP_PUSH_PENDING, &mptcp_sk(sk)->cb_flags); mptcp_data_unlock(sk);