diff options
| author | David Greenman <dg@FreeBSD.org> | 1998-06-05 21:41:48 +0000 |
|---|---|---|
| committer | David Greenman <dg@FreeBSD.org> | 1998-06-05 21:41:48 +0000 |
| commit | 9523f5c199a5318345ed0a01be77bc5a9eed9117 (patch) | |
| tree | c8e9069f9f664f26b62d633c57f7ac6005b9dc6c | |
| parent | c7cbe79e181225c4add3942835176acfd9114124 (diff) | |
Notes
| -rw-r--r-- | sys/kern/uipc_mbuf.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 567fd8185468..b033b1e1f4cd 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94 - * $Id: uipc_mbuf.c,v 1.33 1997/12/28 01:01:13 bde Exp $ + * $Id: uipc_mbuf.c,v 1.34 1998/02/20 13:37:38 bde Exp $ */ #include <sys/param.h> @@ -255,10 +255,14 @@ m_retry(i, t) #define m_retry(i, t) (struct mbuf *)0 MGET(m, i, t); #undef m_retry - if (m != NULL) + if (m != NULL) { mbstat.m_wait++; - else - mbstat.m_drops++; + } else { + if (i == M_DONTWAIT) + mbstat.m_drops++; + else + panic("Out of mbuf clusters"); + } return (m); } @@ -275,10 +279,14 @@ m_retryhdr(i, t) #define m_retryhdr(i, t) (struct mbuf *)0 MGETHDR(m, i, t); #undef m_retryhdr - if (m != NULL) + if (m != NULL) { mbstat.m_wait++; - else - mbstat.m_drops++; + } else { + if (i == M_DONTWAIT) + mbstat.m_drops++; + else + panic("Out of mbuf clusters"); + } return (m); } |
