svn commit: r197827 - projects/tcp_ffcaia2008_8.x/sys/kern
Lawrence Stewart
lstewart at FreeBSD.org
Wed Oct 7 07:04:08 UTC 2009
Author: lstewart
Date: Wed Oct 7 07:04:08 2009
New Revision: 197827
URL: http://svn.freebsd.org/changeset/base/197827
Log:
Consistently use the local wrapearly variable in alq_doio().
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 Wed Oct 7 05:38:44 2009 (r197826)
+++ projects/tcp_ffcaia2008_8.x/sys/kern/kern_alq.c Wed Oct 7 07:04:08 2009 (r197827)
@@ -300,6 +300,7 @@ alq_doio(struct alq *alq)
td = curthread;
totlen = 0;
iov = 1;
+ wrapearly = alq->aq_wrapearly;
bzero(&aiov, sizeof(aiov));
bzero(&auio, sizeof(auio));
@@ -313,7 +314,7 @@ alq_doio(struct alq *alq)
} 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 -
- alq->aq_wrapearly;
+ wrapearly;
} else {
/*
* Buffer wrapped, requires 2 aiov entries:
@@ -321,14 +322,13 @@ alq_doio(struct alq *alq)
* - second is from start of buffer to writehead
*/
aiov[0].iov_len = alq->aq_buflen - alq->aq_writetail -
- alq->aq_wrapearly;
+ wrapearly;
iov++;
aiov[1].iov_base = alq->aq_entbuf;
aiov[1].iov_len = alq->aq_writehead;
totlen = aiov[0].iov_len + aiov[1].iov_len;
}
- wrapearly = alq->aq_wrapearly;
alq->aq_flags |= AQ_FLUSHING;
ALQ_UNLOCK(alq);
More information about the svn-src-projects
mailing list