git: 151a1eab3b78 - main - tcp: fix !INVARIANTS build

From: Gleb Smirnoff <glebius_at_FreeBSD.org>
Date: Sun, 12 Apr 2026 21:46:21 UTC
The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=151a1eab3b785129d279af601ed716eda74886a8

commit 151a1eab3b785129d279af601ed716eda74886a8
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2026-04-12 21:45:40 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2026-04-12 21:45:40 +0000

    tcp: fix !INVARIANTS build
    
    Fixes:  40dbb06fa73cac37d57563c07e55efd0cabbd488
---
 sys/netinet/tcp_usrreq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 277f8fa2af36..6a51068d0461 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -2586,11 +2586,10 @@ unhold:
 static void
 tcp_disconnect(struct tcpcb *tp)
 {
-	struct inpcb *inp = tptoinpcb(tp);
 	struct socket *so = tptosocket(tp);
 
 	NET_EPOCH_ASSERT();
-	INP_WLOCK_ASSERT(inp);
+	INP_WLOCK_ASSERT(tptoinpcb(tp));
 
 	/*
 	 * Neither tcp_close() nor tcp_drop() should return NULL, as the