-/* $OpenBSD: uipc_mbuf.c,v 1.91 2008/08/08 08:54:08 thib Exp $ */
+/* $OpenBSD: uipc_mbuf.c,v 1.92 2008/08/14 19:39:40 claudio Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
if (m->m_flags & M_PKTHDR)
m_tag_delete_chain(m);
if (m->m_flags & M_EXT) {
- if (MCLISREFERENCED(m))
- _MCLDEREFERENCE(m);
- else if (m->m_flags & M_CLUSTER)
+ if (MCLISREFERENCED(m)) {
+ m->m_ext.ext_nextref->m_ext.ext_prevref =
+ m->m_ext.ext_prevref;
+ m->m_ext.ext_prevref->m_ext.ext_nextref =
+ m->m_ext.ext_nextref;
+ } else if (m->m_flags & M_CLUSTER)
pool_put(&mclpool, m->m_ext.ext_buf);
else if (m->m_ext.ext_free)
(*(m->m_ext.ext_free))(m->m_ext.ext_buf,
-/* $OpenBSD: mbuf.h,v 1.101 2008/08/07 18:33:49 henning Exp $ */
+/* $OpenBSD: mbuf.h,v 1.102 2008/08/14 19:39:40 claudio Exp $ */
/* $NetBSD: mbuf.h,v 1.19 1996/02/09 18:25:14 christos Exp $ */
/*
#define MCLISREFERENCED(m) ((m)->m_ext.ext_nextref != (m))
-#define _MCLDEREFERENCE(m) do { \
- (m)->m_ext.ext_nextref->m_ext.ext_prevref = \
- (m)->m_ext.ext_prevref; \
- (m)->m_ext.ext_prevref->m_ext.ext_nextref = \
- (m)->m_ext.ext_nextref; \
- } while (/* CONSTCOND */ 0)
-
#define _MCLADDREFERENCE(o, n) do { \
(n)->m_flags |= ((o)->m_flags & (M_EXT|M_CLUSTER)); \
(n)->m_ext.ext_nextref = (o)->m_ext.ext_nextref; \