diff options
author | phk <phk@FreeBSD.org> | 1998-07-03 08:36:48 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1998-07-03 08:36:48 +0000 |
commit | 2d9a9ab304c39af46412ac7473973f751e3fd93d (patch) | |
tree | 1eb756e243fda636521dcc032c1bc2108b2e1625 /sys/kern/uipc_mbuf.c | |
parent | 78b02c367e739ac72c94e70c7df9a3e45ab4a36f (diff) | |
download | FreeBSD-src-2d9a9ab304c39af46412ac7473973f751e3fd93d.zip FreeBSD-src-2d9a9ab304c39af46412ac7473973f751e3fd93d.tar.gz |
Update M_EXT support in m_copypacket().
PR: 7122
Reviewed by: phk
Submitted by: Castor Fu <castor@geocast.com>
Originally forgotten by: julian
Diffstat (limited to 'sys/kern/uipc_mbuf.c')
-rw-r--r-- | sys/kern/uipc_mbuf.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index b033b1e..8388952 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94 - * $Id: uipc_mbuf.c,v 1.34 1998/02/20 13:37:38 bde Exp $ + * $Id: uipc_mbuf.c,v 1.35 1998/06/05 21:41:48 dg Exp $ */ #include <sys/param.h> @@ -498,7 +498,11 @@ m_copypacket(m, how) n->m_len = m->m_len; if (m->m_flags & M_EXT) { n->m_data = m->m_data; - mclrefcnt[mtocl(m->m_ext.ext_buf)]++; + if(!m->m_ext.ext_ref) + mclrefcnt[mtocl(m->m_ext.ext_buf)]++; + else + (*(m->m_ext.ext_ref))(m->m_ext.ext_buf, + m->m_ext.ext_size); n->m_ext = m->m_ext; n->m_flags |= M_EXT; } else { @@ -517,7 +521,11 @@ m_copypacket(m, how) n->m_len = m->m_len; if (m->m_flags & M_EXT) { n->m_data = m->m_data; - mclrefcnt[mtocl(m->m_ext.ext_buf)]++; + if(!m->m_ext.ext_ref) + mclrefcnt[mtocl(m->m_ext.ext_buf)]++; + else + (*(m->m_ext.ext_ref))(m->m_ext.ext_buf, + m->m_ext.ext_size); n->m_ext = m->m_ext; n->m_flags |= M_EXT; } else { |