Kill the _MCLDEREFERENCE() macro it was only used once and it should be only
authorclaudio <claudio@openbsd.org>
Thu, 14 Aug 2008 19:39:40 +0000 (19:39 +0000)
committerclaudio <claudio@openbsd.org>
Thu, 14 Aug 2008 19:39:40 +0000 (19:39 +0000)
used once -- in m_free(). Removed so that people don't get stupid ideas.
OK thib@

sys/kern/uipc_mbuf.c
sys/sys/mbuf.h

index 64258a3..c832de2 100644 (file)
@@ -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,
index ffa31c1..0a63337 100644 (file)
@@ -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;        \