tcp: Partly revert f2a3782
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 4 Nov 2011 11:29:21 +0000 (19:29 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 4 Nov 2011 11:29:21 +0000 (19:29 +0800)
We do not need to sync the target netisr before disconnect or shutdown,
the problem was fixed in 392cd26 and turned out to be ipi message
ordering problem.

sys/kern/uipc_socket.c

index 6fa618a..18e06b2 100644 (file)
@@ -391,7 +391,6 @@ soclose(struct socket *so, int fflag)
        if (so->so_pcb == NULL)
                goto discard;
        if (so->so_state & SS_ISCONNECTED) {
-               so_pru_sync(so);
                if ((so->so_state & SS_ISDISCONNECTING) == 0) {
                        error = sodisconnect(so);
                        if (error)
@@ -1373,10 +1372,8 @@ soshutdown(struct socket *so, int how)
                sorflush(so);
                /*ssb_unlock(&so->so_rcv);*/
        }
-       if (how != SHUT_RD) {
-               so_pru_sync(so);
+       if (how != SHUT_RD)
                return (so_pru_shutdown(so));
-       }
        return (0);
 }