Author: glebius
Date: Wed Jan 22 06:04:56 2020
New Revision: 356980
URL: https://svnweb.freebsd.org/changeset/base/356980

Log:
  Don't enter network epoch in tcp_usr_detach. A PCB removal doesn't
  require that.

Modified:
  head/sys/netinet/tcp_usrreq.c

Modified: head/sys/netinet/tcp_usrreq.c
==============================================================================
--- head/sys/netinet/tcp_usrreq.c       Wed Jan 22 06:03:45 2020        
(r356979)
+++ head/sys/netinet/tcp_usrreq.c       Wed Jan 22 06:04:56 2020        
(r356980)
@@ -214,7 +214,6 @@ tcp_detach(struct socket *so, struct inpcb *inp)
 {
        struct tcpcb *tp;
 
-       INP_INFO_LOCK_ASSERT(&V_tcbinfo);
        INP_WLOCK_ASSERT(inp);
 
        KASSERT(so->so_pcb == inp, ("tcp_detach: so_pcb != inp"));
@@ -311,21 +310,13 @@ static void
 tcp_usr_detach(struct socket *so)
 {
        struct inpcb *inp;
-       int rlock = 0;
-       struct epoch_tracker et;
 
        inp = sotoinpcb(so);
        KASSERT(inp != NULL, ("tcp_usr_detach: inp == NULL"));
-       if (!INP_INFO_WLOCKED(&V_tcbinfo)) {
-               NET_EPOCH_ENTER(et);
-               rlock = 1;
-       }
        INP_WLOCK(inp);
        KASSERT(inp->inp_socket != NULL,
            ("tcp_usr_detach: inp_socket == NULL"));
        tcp_detach(so, inp);
-       if (rlock)
-               NET_EPOCH_EXIT(et);
 }
 
 #ifdef INET
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to