svn commit: r272686 - projects/sendfile/sys/netinet

Gleb Smirnoff glebius at FreeBSD.org
Tue Oct 7 13:08:53 UTC 2014


Author: glebius
Date: Tue Oct  7 13:08:52 2014
New Revision: 272686
URL: https://svnweb.freebsd.org/changeset/base/272686

Log:
  tcp_usr_ready() shouldn't honor SBS_CANTSENDMORE, since data already
  is in the socket and we must send it.
  
  Sponsored by:	Netflix
  Sponsored by:	Nginx, Inc.

Modified:
  projects/sendfile/sys/netinet/tcp_usrreq.c

Modified: projects/sendfile/sys/netinet/tcp_usrreq.c
==============================================================================
--- projects/sendfile/sys/netinet/tcp_usrreq.c	Tue Oct  7 10:54:53 2014	(r272685)
+++ projects/sendfile/sys/netinet/tcp_usrreq.c	Tue Oct  7 13:08:52 2014	(r272686)
@@ -941,17 +941,10 @@ tcp_usr_ready(struct socket *so, struct 
 	tp = intotcpcb(inp);
 
 	SOCKBUF_LOCK(&so->so_snd);
-	if (so->so_snd.sb_state & SBS_CANTSENDMORE) {
-		SOCKBUF_UNLOCK(&so->so_snd);
-		error = ENOTCONN;
-	} else if (sbready(&so->so_snd, m, count) == 0) {
-		SOCKBUF_UNLOCK(&so->so_snd);
+	error = sbready(&so->so_snd, m, count);
+	SOCKBUF_UNLOCK(&so->so_snd);
+	if (error == 0)
 		error = tcp_output(tp);
-	} else {
-		SOCKBUF_UNLOCK(&so->so_snd);
-		error = EINPROGRESS;
-	}
-
 	INP_WUNLOCK(inp);
 
 	return (error);


More information about the svn-src-projects mailing list