Fix KASSERT in m_free_fast - the LIST_EMPTY check only applies to packet headers.

In the non packet header case there may be data there.
This commit is contained in:
kmacy 2008-01-09 06:29:49 +00:00
parent bb203b2edf
commit 2d4fcb7dc7

View File

@ -496,8 +496,11 @@ m_getjcl(int how, short type, int flags, int size)
static __inline void static __inline void
m_free_fast(struct mbuf *m) m_free_fast(struct mbuf *m)
{ {
KASSERT(SLIST_EMPTY(&m->m_pkthdr.tags), ("doing fast free of mbuf with tags")); #ifdef INVARIANTS
if (m->m_flags & M_PKTHDR)
KASSERT(SLIST_EMPTY(&m->m_pkthdr.tags), ("doing fast free of mbuf with tags"));
#endif
uma_zfree_arg(zone_mbuf, m, (void *)MB_NOTAGS); uma_zfree_arg(zone_mbuf, m, (void *)MB_NOTAGS);
} }