Skip to content

Commit

Permalink
mptcp: drop 'first' in __mptcp_subflow_push_pending
Browse files Browse the repository at this point in the history
Signed-off-by: Geliang Tang <[email protected]>
  • Loading branch information
Geliang Tang authored and geliangtang committed Mar 12, 2024
1 parent 769d103 commit 8d68c49
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions net/mptcp/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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;

Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 8d68c49

Please sign in to comment.