svn commit: r187952 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
dev/cxgb kern
Alexander Motin
mav at FreeBSD.org
Sat Jan 31 04:32:20 PST 2009
Author: mav
Date: Sat Jan 31 12:32:18 2009
New Revision: 187952
URL: http://svn.freebsd.org/changeset/base/187952
Log:
MFC rev. 187409
Teach m_copyback() to use trailing space of the last mbuf in chain.
Modified:
stable/7/sys/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
stable/7/sys/dev/ath/ath_hal/ (props changed)
stable/7/sys/dev/cxgb/ (props changed)
stable/7/sys/kern/uipc_mbuf.c
Modified: stable/7/sys/kern/uipc_mbuf.c
==============================================================================
--- stable/7/sys/kern/uipc_mbuf.c Sat Jan 31 12:29:12 2009 (r187951)
+++ stable/7/sys/kern/uipc_mbuf.c Sat Jan 31 12:32:18 2009 (r187952)
@@ -1267,6 +1267,10 @@ m_copyback(struct mbuf *m0, int off, int
m = m->m_next;
}
while (len > 0) {
+ if (m->m_next == NULL && (len > m->m_len - off)) {
+ m->m_len += min(len - (m->m_len - off),
+ M_TRAILINGSPACE(m));
+ }
mlen = min (m->m_len - off, len);
bcopy(cp, off + mtod(m, caddr_t), (u_int)mlen);
cp += mlen;
More information about the svn-src-stable-7
mailing list