Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Stop passing the pool as argument of t...



details:   https://anonhg.NetBSD.org/src/rev/cf50bd5693bc
branches:  trunk
changeset: 318511:cf50bd5693bc
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Apr 27 16:18:40 2018 +0000
description:
Stop passing the pool as argument of the storage. M_EXT_CLUSTER mbufs
are supposed to take their area from mcl_cache only.

diffstat:

 sys/kern/uipc_mbuf.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r 0d4a01d936b1 -r cf50bd5693bc sys/kern/uipc_mbuf.c
--- a/sys/kern/uipc_mbuf.c      Fri Apr 27 12:04:23 2018 +0000
+++ b/sys/kern/uipc_mbuf.c      Fri Apr 27 16:18:40 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_mbuf.c,v 1.206 2018/04/27 09:22:28 maxv Exp $     */
+/*     $NetBSD: uipc_mbuf.c,v 1.207 2018/04/27 16:18:40 maxv Exp $     */
 
 /*
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.206 2018/04/27 09:22:28 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.207 2018/04/27 16:18:40 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_mbuftrace.h"
@@ -591,7 +591,7 @@
        m->m_ext.ext_flags = 0;
        m->m_ext.ext_size = MCLBYTES;
        m->m_ext.ext_free = NULL;
-       m->m_ext.ext_arg = mcl_cache;
+       m->m_ext.ext_arg = NULL;
        /* ext_paddr initialized above */
 
        mowner_ref(m, M_EXT|M_EXT_CLUSTER);
@@ -1932,8 +1932,7 @@
                        m_ext_free(m->m_ext_ref);
                        m->m_ext_ref = m;
                } else if ((m->m_flags & M_EXT_CLUSTER) != 0) {
-                       pool_cache_put_paddr((struct pool_cache *)
-                           m->m_ext.ext_arg,
+                       pool_cache_put_paddr(mcl_cache,
                            m->m_ext.ext_buf, m->m_ext.ext_paddr);
                } else if (m->m_ext.ext_free) {
                        (*m->m_ext.ext_free)(m,



Home | Main Index | Thread Index | Old Index