Correct check for NULL in MEXT_INIT_REF() which should be checking whether
mbuf->m_ext.ref_cnt is NULL, and not whether mbuf is. Also, remove spaces before "mbtypes" in MGET and MGETHDR macros. Pointed out by: dwmalone
This commit is contained in:
parent
d62abc771f
commit
7ba0dcf1ae
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=67168
@ -320,7 +320,7 @@ struct mcntfree_lst {
|
||||
struct mbuf *__mmm = (m); \
|
||||
\
|
||||
_MEXT_ALLOC_CNT(__mmm->m_ext.ref_cnt, (how)); \
|
||||
if (__mmm != NULL) \
|
||||
if (__mmm->m_ext.ref_cnt != NULL) \
|
||||
MEXT_ADD_REF(__mmm); \
|
||||
} while (0)
|
||||
|
||||
@ -367,7 +367,7 @@ struct mcntfree_lst {
|
||||
mtx_enter(&mmbfree.m_mtx, MTX_DEF); \
|
||||
_MGET(_mm, _mhow); \
|
||||
if (_mm != NULL) { \
|
||||
mbtypes[_mtype]++; \
|
||||
mbtypes[_mtype]++; \
|
||||
mtx_exit(&mmbfree.m_mtx, MTX_DEF); \
|
||||
_MGET_SETUP(_mm, _mtype); \
|
||||
} else \
|
||||
@ -394,7 +394,7 @@ struct mcntfree_lst {
|
||||
mtx_enter(&mmbfree.m_mtx, MTX_DEF); \
|
||||
_MGET(_mm, _mhow); \
|
||||
if (_mm != NULL) { \
|
||||
mbtypes[_mtype]++; \
|
||||
mbtypes[_mtype]++; \
|
||||
mtx_exit(&mmbfree.m_mtx, MTX_DEF); \
|
||||
_MGETHDR_SETUP(_mm, _mtype); \
|
||||
} else \
|
||||
|
Loading…
Reference in New Issue
Block a user