svn commit: r197809 - projects/tcp_ffcaia2008_8.x/sys/kern

Lawrence Stewart lstewart at FreeBSD.org
Tue Oct 6 17:33:01 UTC 2009


Author: lstewart
Date: Tue Oct  6 17:33:00 2009
New Revision: 197809
URL: http://svn.freebsd.org/changeset/base/197809

Log:
  Remove a superfluous semi-colon and fix an accounting bug in alq_doio(). The
  special case where the buffer had wrapped early but no bytes had been
  subsequently written (i.e. alq->aq_writehead == 0 && alq->aq_wrapearly > 0) was
  not handled correctly.
  
  Sponsored by:	FreeBSD Foundation

Modified:
  projects/tcp_ffcaia2008_8.x/sys/kern/kern_alq.c

Modified: projects/tcp_ffcaia2008_8.x/sys/kern/kern_alq.c
==============================================================================
--- projects/tcp_ffcaia2008_8.x/sys/kern/kern_alq.c	Tue Oct  6 17:14:39 2009	(r197808)
+++ projects/tcp_ffcaia2008_8.x/sys/kern/kern_alq.c	Tue Oct  6 17:33:00 2009	(r197809)
@@ -313,7 +313,8 @@ alq_doio(struct alq *alq)
 		totlen = aiov[0].iov_len = alq->aq_writehead - alq->aq_writetail;
 	} else if (alq->aq_writehead == 0) {
 		/* Buffer not wrapped (special case to avoid an empty iov). */
-		totlen = aiov[0].iov_len = alq->aq_buflen - alq->aq_writetail;;
+		totlen = aiov[0].iov_len = alq->aq_buflen - alq->aq_writetail -
+		    alq->aq_wrapearly;
 	} else {
 		/*
 		 * Buffer wrapped, requires 2 aiov entries:


More information about the svn-src-projects mailing list