Date: Tue, 6 Oct 2009 17:33:00 +0000 (UTC) From: Lawrence Stewart <lstewart@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r197809 - projects/tcp_ffcaia2008_8.x/sys/kern Message-ID: <200910061733.n96HX03o053574@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910061733.n96HX03o053574>