Finish r243882: mechanically substitute flags from historic mbuf

allocator with malloc(9) flags within sys.

Sponsored by:	Nginx, Inc.
This commit is contained in:
glebius 2013-03-12 08:59:51 +00:00
parent cd3470bcd6
commit ce7d7c6757
3 changed files with 13 additions and 13 deletions

View File

@ -91,7 +91,7 @@ isc_sendPDU(isc_session_t *sp, pduq_t *pq)
/*
| mbuf for the iSCSI header
*/
MGETHDR(mh, M_TRYWAIT, MT_DATA);
MGETHDR(mh, M_WAITOK, MT_DATA);
mh->m_pkthdr.rcvif = NULL;
mh->m_next = NULL;
mh->m_len = sizeof(union ipdu_u);
@ -132,7 +132,7 @@ isc_sendPDU(isc_session_t *sp, pduq_t *pq)
while(len > 0) {
int l;
MGET(md, M_TRYWAIT, MT_DATA);
MGET(md, M_WAITOK, MT_DATA);
md->m_ext.ref_cnt = &ou_refcnt;
l = min(MCLBYTES, len);
debug(4, "setting ext_free(arg=%p len/l=%d/%d)", pq->buf, len, l);
@ -150,7 +150,7 @@ isc_sendPDU(isc_session_t *sp, pduq_t *pq)
off += l;
}
if(((pp->ds_len & 03) != 0) || ISOK2DIG(sp->dataDigest, pp)) {
MGET(md, M_TRYWAIT, MT_DATA);
MGET(md, M_WAITOK, MT_DATA);
if(pp->ds_len & 03)
len = 4 - (pp->ds_len & 03);
else

View File

@ -140,32 +140,32 @@
* Allocate mbufs. Must succeed and never set the mbuf ptr to NULL.
*/
#define NFSMGET(m) do { \
MGET((m), M_TRYWAIT, MT_DATA); \
MGET((m), M_WAITOK, MT_DATA); \
while ((m) == NULL ) { \
(void) nfs_catnap(PZERO, 0, "nfsmget"); \
MGET((m), M_TRYWAIT, MT_DATA); \
MGET((m), M_WAITOK, MT_DATA); \
} \
} while (0)
#define NFSMGETHDR(m) do { \
MGETHDR((m), M_TRYWAIT, MT_DATA); \
MGETHDR((m), M_WAITOK, MT_DATA); \
while ((m) == NULL ) { \
(void) nfs_catnap(PZERO, 0, "nfsmget"); \
MGETHDR((m), M_TRYWAIT, MT_DATA); \
MGETHDR((m), M_WAITOK, MT_DATA); \
} \
} while (0)
#define NFSMCLGET(m, w) do { \
MGET((m), M_TRYWAIT, MT_DATA); \
MGET((m), M_WAITOK, MT_DATA); \
while ((m) == NULL ) { \
(void) nfs_catnap(PZERO, 0, "nfsmget"); \
MGET((m), M_TRYWAIT, MT_DATA); \
MGET((m), M_WAITOK, MT_DATA); \
} \
MCLGET((m), (w)); \
} while (0)
#define NFSMCLGETHDR(m, w) do { \
MGETHDR((m), M_TRYWAIT, MT_DATA); \
MGETHDR((m), M_WAITOK, MT_DATA); \
while ((m) == NULL ) { \
(void) nfs_catnap(PZERO, 0, "nfsmget"); \
MGETHDR((m), M_TRYWAIT, MT_DATA); \
MGETHDR((m), M_WAITOK, MT_DATA); \
} \
} while (0)
#define NFSMTOD mtod

View File

@ -228,9 +228,9 @@ xdrmbuf_putbytes(XDR *xdrs, const char *addr, u_int len)
if (xdrs->x_handy == m->m_len && M_TRAILINGSPACE(m) == 0) {
if (!m->m_next) {
MGET(n, M_TRYWAIT, m->m_type);
MGET(n, M_WAITOK, m->m_type);
if (m->m_flags & M_EXT)
MCLGET(n, M_TRYWAIT);
MCLGET(n, M_WAITOK);
m->m_next = n;
}
m = m->m_next;