All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: netdev@vger.kernel.org
Cc: Eric Dumazet <edumazet@google.com>
Subject: [PATCH] net: remove unused TCPF_TSQ_DEFERRED
Date: Sat, 26 Mar 2022 09:57:30 -0600	[thread overview]
Message-ID: <8d326eb1-03de-6b8b-009e-7365255dd271@kernel.dk> (raw)

tcp_release_cb() checks for this flag, but nobody is setting it. Just
kill it off.

Signed-off-by: Jens Axboe <axboe@kernel.dk>

---

diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 78b91bb92f0d..7d803ab7da45 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -428,7 +428,6 @@ enum tsq_enum {
 enum tsq_flags {
 	TSQF_THROTTLED			= (1UL << TSQ_THROTTLED),
 	TSQF_QUEUED			= (1UL << TSQ_QUEUED),
-	TCPF_TSQ_DEFERRED		= (1UL << TCP_TSQ_DEFERRED),
 	TCPF_WRITE_TIMER_DEFERRED	= (1UL << TCP_WRITE_TIMER_DEFERRED),
 	TCPF_DELACK_TIMER_DEFERRED	= (1UL << TCP_DELACK_TIMER_DEFERRED),
 	TCPF_MTU_REDUCED_DEFERRED	= (1UL << TCP_MTU_REDUCED_DEFERRED),
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 5079832af5c1..a53bc45a2053 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1064,8 +1064,7 @@ static void tcp_tasklet_func(struct tasklet_struct *t)
 	}
 }
 
-#define TCP_DEFERRED_ALL (TCPF_TSQ_DEFERRED |		\
-			  TCPF_WRITE_TIMER_DEFERRED |	\
+#define TCP_DEFERRED_ALL (TCPF_WRITE_TIMER_DEFERRED |	\
 			  TCPF_DELACK_TIMER_DEFERRED |	\
 			  TCPF_MTU_REDUCED_DEFERRED)
 /**
@@ -1087,10 +1086,6 @@ void tcp_release_cb(struct sock *sk)
 		nflags = flags & ~TCP_DEFERRED_ALL;
 	} while (cmpxchg(&sk->sk_tsq_flags, flags, nflags) != flags);
 
-	if (flags & TCPF_TSQ_DEFERRED) {
-		tcp_tsq_write(sk);
-		__sock_put(sk);
-	}
 	/* Here begins the tricky part :
 	 * We are called from release_sock() with :
 	 * 1) BH disabled

-- 
Jens Axboe


             reply	other threads:[~2022-03-26 15:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-26 15:57 Jens Axboe [this message]
2022-03-26 16:19 ` [PATCH] net: remove unused TCPF_TSQ_DEFERRED Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8d326eb1-03de-6b8b-009e-7365255dd271@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.