summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/rpc/clnt_dg.c2
-rw-r--r--sys/rpc/clnt_vc.c2
-rw-r--r--sys/rpc/rpc_generic.c4
-rw-r--r--sys/rpc/rpcm_subs.h2
-rw-r--r--sys/rpc/svc.c4
-rw-r--r--sys/rpc/svc_dg.c3
-rw-r--r--sys/rpc/svc_vc.c6
7 files changed, 8 insertions, 15 deletions
diff --git a/sys/rpc/clnt_dg.c b/sys/rpc/clnt_dg.c
index 86a8d01..a658de9 100644
--- a/sys/rpc/clnt_dg.c
+++ b/sys/rpc/clnt_dg.c
@@ -431,7 +431,7 @@ call_again:
send_again:
mtx_unlock(&cs->cs_lock);
- MGETHDR(mreq, M_WAITOK, MT_DATA);
+ mreq = m_gethdr(M_WAITOK, MT_DATA);
KASSERT(cu->cu_mcalllen <= MHLEN, ("RPC header too big"));
bcopy(cu->cu_mcallc, mreq->m_data, cu->cu_mcalllen);
mreq->m_len = cu->cu_mcalllen;
diff --git a/sys/rpc/clnt_vc.c b/sys/rpc/clnt_vc.c
index e42d26d..bc48e19 100644
--- a/sys/rpc/clnt_vc.c
+++ b/sys/rpc/clnt_vc.c
@@ -349,7 +349,7 @@ call_again:
/*
* Leave space to pre-pend the record mark.
*/
- MGETHDR(mreq, M_WAITOK, MT_DATA);
+ mreq = m_gethdr(M_WAITOK, MT_DATA);
mreq->m_data += sizeof(uint32_t);
KASSERT(ct->ct_mpos + sizeof(uint32_t) <= MHLEN,
("RPC header too big"));
diff --git a/sys/rpc/rpc_generic.c b/sys/rpc/rpc_generic.c
index 65f57cf..dd5c6c3 100644
--- a/sys/rpc/rpc_generic.c
+++ b/sys/rpc/rpc_generic.c
@@ -750,9 +750,7 @@ clnt_call_private(
struct mbuf *mrep;
enum clnt_stat stat;
- MGET(mreq, M_WAITOK, MT_DATA);
- MCLGET(mreq, M_WAITOK);
- mreq->m_len = 0;
+ mreq = m_getcl(M_WAITOK, MT_DATA, 0);
xdrmbuf_create(&xdrs, mreq, XDR_ENCODE);
if (!xargs(&xdrs, argsp)) {
diff --git a/sys/rpc/rpcm_subs.h b/sys/rpc/rpcm_subs.h
index f0d60a3..e4fddb5 100644
--- a/sys/rpc/rpcm_subs.h
+++ b/sys/rpc/rpcm_subs.h
@@ -80,7 +80,7 @@
#define rpcm_build(a,c,s) \
{ if ((s) > M_TRAILINGSPACE(mb)) { \
- MGET(mb2, M_WAITOK, MT_DATA); \
+ mb2 = m_get(M_WAITOK, MT_DATA); \
if ((s) > MLEN) \
panic("build > MLEN"); \
mb->m_next = mb2; \
diff --git a/sys/rpc/svc.c b/sys/rpc/svc.c
index f038e78..bbc6f6d 100644
--- a/sys/rpc/svc.c
+++ b/sys/rpc/svc.c
@@ -563,9 +563,7 @@ svc_sendreply(struct svc_req *rqstp, xdrproc_t xdr_results, void * xdr_location)
rply.acpted_rply.ar_results.where = NULL;
rply.acpted_rply.ar_results.proc = (xdrproc_t) xdr_void;
- MGET(m, M_WAITOK, MT_DATA);
- MCLGET(m, M_WAITOK);
- m->m_len = 0;
+ m = m_getcl(M_WAITOK, MT_DATA, 0);
xdrmbuf_create(&xdrs, m, XDR_ENCODE);
ok = xdr_results(&xdrs, xdr_location);
XDR_DESTROY(&xdrs);
diff --git a/sys/rpc/svc_dg.c b/sys/rpc/svc_dg.c
index ba6a56e..3df79bb 100644
--- a/sys/rpc/svc_dg.c
+++ b/sys/rpc/svc_dg.c
@@ -238,8 +238,7 @@ svc_dg_reply(SVCXPRT *xprt, struct rpc_msg *msg,
bool_t stat = TRUE;
int error;
- MGETHDR(mrep, M_WAITOK, MT_DATA);
- mrep->m_len = 0;
+ mrep = m_gethdr(M_WAITOK, MT_DATA);
xdrmbuf_create(&xdrs, mrep, XDR_ENCODE);
diff --git a/sys/rpc/svc_vc.c b/sys/rpc/svc_vc.c
index 667d84c..80824ef 100644
--- a/sys/rpc/svc_vc.c
+++ b/sys/rpc/svc_vc.c
@@ -796,8 +796,7 @@ svc_vc_reply(SVCXPRT *xprt, struct rpc_msg *msg,
/*
* Leave space for record mark.
*/
- MGETHDR(mrep, M_WAITOK, MT_DATA);
- mrep->m_len = 0;
+ mrep = m_gethdr(M_WAITOK, MT_DATA);
mrep->m_data += sizeof(uint32_t);
xdrmbuf_create(&xdrs, mrep, XDR_ENCODE);
@@ -850,8 +849,7 @@ svc_vc_backchannel_reply(SVCXPRT *xprt, struct rpc_msg *msg,
/*
* Leave space for record mark.
*/
- MGETHDR(mrep, M_WAITOK, MT_DATA);
- mrep->m_len = 0;
+ mrep = m_gethdr(M_WAITOK, MT_DATA);
mrep->m_data += sizeof(uint32_t);
xdrmbuf_create(&xdrs, mrep, XDR_ENCODE);
OpenPOWER on IntegriCloud