Fix a bug in the mbstats accounting. m_mbufs was being decremented for
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 9 Jun 2005 18:26:22 +0000 (18:26 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 9 Jun 2005 18:26:22 +0000 (18:26 +0000)
commitc3ef87caf0dc6890cac867a687915d06a5c72b9c
treed930492d2faeaeb16ab0d8b19c42c51e521fa232
parentc4da22e4ae4f57aa7556a178dcf37055c8935df1
Fix a bug in the mbstats accounting.  m_mbufs was being decremented for
normal mbufs converted to clustered mbufs, but in fact it should not be
because we decrement it properly when the normal-mbuf-with-cluster is
freed.

Change most of the m_getl()'s back to m_get()'s or m_gethdr()'s in order
to guarentee that the mbuf does NOT have a cluster associated with it
since we are going to try to share the old mbuf's cluster later on
(in m_copym()).  This bug was causing the system to run out of mbuf
clusters.

Add a number of assertions for correct operation.
sys/kern/uipc_mbuf.c