fix recursive mtx_lock() call.

Submitted by:	mjacob
This commit is contained in:
Hajimu UMEMOTO 2001-06-13 18:53:53 +00:00
parent 67d9fd5ac4
commit 1d752b5e0f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78178

View File

@ -531,6 +531,7 @@ struct mcntfree_lst {
*/
#define MFREE(m, n) do { \
struct mbuf *_mm = (m); \
struct mbuf *_aux; \
\
KASSERT(_mm->m_type != MT_FREE, ("freeing free mbuf")); \
if (_mm->m_flags & M_EXT) \
@ -538,8 +539,10 @@ struct mcntfree_lst {
mtx_lock(&mbuf_mtx); \
mbtypes[_mm->m_type]--; \
if ((_mm->m_flags & M_PKTHDR) != 0 && _mm->m_pkthdr.aux) { \
m_freem(_mm->m_pkthdr.aux); \
_aux = _mm->m_pkthdr.aux; \
_mm->m_pkthdr.aux = NULL; \
} else { \
_aux = NULL; \
} \
_mm->m_type = MT_FREE; \
mbtypes[MT_FREE]++; \
@ -548,6 +551,8 @@ struct mcntfree_lst {
mmbfree.m_head = _mm; \
MBWAKEUP(m_mballoc_wid, &mmbfree.m_starved); \
mtx_unlock(&mbuf_mtx); \
if (_aux) \
m_freem(_aux); \
} while (0)
/*