Fix logic error which caused a page fault in kernel mode immediately

on boot up.

Submitted by:	Bosko Milekic <bmilekic@technokratis.com>
This commit is contained in:
John Polstra 2000-08-19 23:50:41 +00:00
parent 4153a3a323
commit 2550f17d1c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=64855

View File

@ -290,8 +290,12 @@ union mext_refcnt {
union mext_refcnt *__mcnt; \
\
__mcnt = mext_refcnt_free; \
if ((__mcnt == NULL) && (m_alloc_ref(1) == 0)) \
panic("mbuf subsystem: out of ref counts!"); \
if (__mcnt == NULL) { \
if (m_alloc_ref(1) != 0) \
__mcnt = mext_refcnt_free; \
else \
panic("mbuf subsystem: out of ref counts!"); \
} \
mext_refcnt_free = __mcnt->next_ref; \
__mcnt->next_ref = NULL; \
(m_cnt) = __mcnt; \