[PATCH mptcp-next] Squash to "mptcp: delay updating first_pending" v20

Geliang Tang posted 1 patch 2 weeks, 6 days ago
Failed in applying to current master (apply log)
net/mptcp/protocol.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
[PATCH mptcp-next] Squash to "mptcp: delay updating first_pending" v20
Posted by Geliang Tang 2 weeks, 6 days ago
Drop mptcp_update_first_pending() helper.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 net/mptcp/protocol.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 4c249d1b9ec6..6f90c28f7612 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1503,7 +1503,7 @@ static void mptcp_update_post_push(struct mptcp_sock *msk,
 		msk->snd_nxt = snd_nxt_new;
 }
 
-static void mptcp_update_first_pending(struct sock *sk, struct mptcp_sendmsg_info *info)
+static void mptcp_update_dfrags(struct sock *sk, struct mptcp_sendmsg_info *info)
 {
 	struct mptcp_sock *msk = mptcp_sk(sk);
 
@@ -1511,11 +1511,6 @@ static void mptcp_update_first_pending(struct sock *sk, struct mptcp_sendmsg_inf
 		WRITE_ONCE(msk->first_pending, mptcp_next_frag(sk, info->last_frag));
 }
 
-static void mptcp_update_dfrags(struct sock *sk, struct mptcp_sendmsg_info *info)
-{
-	mptcp_update_first_pending(sk, info);
-}
-
 void mptcp_check_and_set_pending(struct sock *sk)
 {
 	if (mptcp_send_head(sk))
@@ -1608,7 +1603,6 @@ void __mptcp_push_pending(struct sock *sk, unsigned int flags)
 
 				ret = __subflow_push_pending(sk, ssk, &info);
 				if (ret <= 0) {
-					mptcp_update_first_pending(sk, &info);
 					if (ret != -EAGAIN ||
 					    inet_sk_state_load(ssk) == TCP_FIN_WAIT1 ||
 					    inet_sk_state_load(ssk) == TCP_FIN_WAIT2 ||
@@ -1655,13 +1649,11 @@ static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk, bool
 		if (first) {
 			ret = __subflow_push_pending(sk, ssk, &info);
 			first = false;
-			if (ret <= 0) {
-				mptcp_update_first_pending(sk, &info);
+			mptcp_update_dfrags(sk, &info);
+			if (ret <= 0)
 				break;
-			}
 			copied += ret;
 			msk->last_snd = ssk;
-			mptcp_update_dfrags(sk, &info);
 			continue;
 		}
 
@@ -1682,7 +1674,6 @@ static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk, bool
 
 				ret = __subflow_push_pending(sk, ssk, &info);
 				if (ret <= 0) {
-					mptcp_update_first_pending(sk, &info);
 					err = 1;
 					continue;
 				}
-- 
2.35.3