svn commit: r198016 - user/kmacy/releng_8_fcs/sys/kern

Kip Macy kmacy at FreeBSD.org
Tue Oct 13 04:26:05 UTC 2009


Author: kmacy
Date: Tue Oct 13 04:26:04 2009
New Revision: 198016
URL: http://svn.freebsd.org/changeset/base/198016

Log:
  continue to wait until the residual ref is dropped

Modified:
  user/kmacy/releng_8_fcs/sys/kern/uipc_socket.c

Modified: user/kmacy/releng_8_fcs/sys/kern/uipc_socket.c
==============================================================================
--- user/kmacy/releng_8_fcs/sys/kern/uipc_socket.c	Tue Oct 13 04:14:48 2009	(r198015)
+++ user/kmacy/releng_8_fcs/sys/kern/uipc_socket.c	Tue Oct 13 04:26:04 2009	(r198016)
@@ -624,9 +624,10 @@ sofree(struct socket *so)
 	if (bg_sendfile_enable) {
 		SOCKBUF_LOCK(&so->so_snd);
 		if ((so->so_snd.sb_flags & (SB_SENDING|SB_SENDING_TASK)) ==
-		    (SB_SENDING|SB_SENDING_TASK))
-			sbwait(&so->so_snd);
-		else if (so->so_snd.sb_flags & SB_SENDING)
+		    (SB_SENDING|SB_SENDING_TASK)) {
+			while (so->so_snd.sb_flags & SB_SENDING)
+				sbwait(&so->so_snd);
+		} else if (so->so_snd.sb_flags & SB_SENDING)
 			sosendingwakeup(&so->so_snd);
 		SOCKBUF_UNLOCK(&so->so_snd);
 	}


More information about the svn-src-user mailing list