diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-08-11 11:53:20 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-08-11 11:53:20 +0000 |
commit | 2bf09869861fcaded19fb983b3d701e76fc63f26 (patch) | |
tree | c7315b168d2f9336fef1f78fdb39f327cf86a18c /sys/kern | |
parent | eaa5cc3a729723b87f770e5319d57549e6bd9bcc (diff) |
optimise m_clget so that it holds spl for even less
ok dlg thib
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/uipc_mbuf.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 7636f9ad2d7..b36711e74b0 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_mbuf.c,v 1.129 2009/08/11 10:48:39 deraadt Exp $ */ +/* $OpenBSD: uipc_mbuf.c,v 1.130 2009/08/11 11:53:19 deraadt Exp $ */ /* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */ /* @@ -421,21 +421,18 @@ m_clget(struct mbuf *m, int how, struct ifnet *ifp, u_int pktlen) splx(s); return (NULL); } - if (m->m_ext.ext_buf != NULL) { - m->m_data = m->m_ext.ext_buf; - m->m_flags |= M_EXT|M_CLUSTER; - m->m_ext.ext_size = mclpools[pi].pr_size; - m->m_ext.ext_free = NULL; - m->m_ext.ext_arg = NULL; - - m->m_ext.ext_backend = pi; - m->m_ext.ext_ifp = ifp; - if (ifp != NULL) - m_clcount(ifp, pi); - - MCLINITREFERENCE(m); - } + if (ifp != NULL) + m_clcount(ifp, pi); splx(s); + + m->m_data = m->m_ext.ext_buf; + m->m_flags |= M_EXT|M_CLUSTER; + m->m_ext.ext_size = mclpools[pi].pr_size; + m->m_ext.ext_free = NULL; + m->m_ext.ext_arg = NULL; + m->m_ext.ext_backend = pi; + m->m_ext.ext_ifp = ifp; + MCLINITREFERENCE(m); return (m); } |