From: claudio Date: Thu, 14 Aug 2008 19:39:40 +0000 (+0000) Subject: Kill the _MCLDEREFERENCE() macro it was only used once and it should be only X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=691e50f2575a12edd49704ff0cf72baa37825af6;p=openbsd Kill the _MCLDEREFERENCE() macro it was only used once and it should be only used once -- in m_free(). Removed so that people don't get stupid ideas. OK thib@ --- diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 64258a31c8f..c832de261bb 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -1,4 +1,4 @@ -/* $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 $ */ /* @@ -271,9 +271,12 @@ m_free(struct mbuf *m) 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, diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index ffa31c10679..0a63337550a 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -1,4 +1,4 @@ -/* $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 $ */ /* @@ -239,13 +239,6 @@ struct mbuf { #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; \