mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-23 19:28:36 +00:00
tcp: remove extraneous network epoch entry
accept(2) on IPv6 TCP doesn't need epoch. Some leaf functions may need it, but they will enter accordingly, see sa6_recoverscope(). Reviewed by: rscheff, tuexen (implicitly, see deleted XXXMT) Differential Revision: https://reviews.freebsd.org/D42634
This commit is contained in:
parent
22bac49b09
commit
70e30addaf
|
@ -767,17 +767,14 @@ tcp6_usr_accept(struct socket *so, struct sockaddr **nam)
|
|||
struct tcpcb *tp;
|
||||
struct in_addr addr;
|
||||
struct in6_addr addr6;
|
||||
struct epoch_tracker et;
|
||||
in_port_t port = 0;
|
||||
int v4 = 0;
|
||||
|
||||
inp = sotoinpcb(so);
|
||||
KASSERT(inp != NULL, ("tcp6_usr_accept: inp == NULL"));
|
||||
NET_EPOCH_ENTER(et); /* XXXMT Why is this needed? */
|
||||
INP_WLOCK(inp);
|
||||
if (inp->inp_flags & INP_DROPPED) {
|
||||
INP_WUNLOCK(inp);
|
||||
NET_EPOCH_EXIT(et);
|
||||
return (ECONNABORTED);
|
||||
}
|
||||
tp = intotcpcb(inp);
|
||||
|
@ -804,7 +801,6 @@ tcp6_usr_accept(struct socket *so, struct sockaddr **nam)
|
|||
tcp_bblog_pru(tp, PRU_ACCEPT, error);
|
||||
TCP_PROBE2(debug__user, tp, PRU_ACCEPT);
|
||||
INP_WUNLOCK(inp);
|
||||
NET_EPOCH_EXIT(et);
|
||||
if (error == 0) {
|
||||
if (v4)
|
||||
*nam = in6_v4mapsin6_sockaddr(port, &addr);
|
||||
|
|
Loading…
Reference in a new issue