svn commit: r248318 - in head/sys: kern nfs xdr
Gleb Smirnoff
glebius at FreeBSD.org
Fri Mar 15 10:21:19 UTC 2013
Author: glebius
Date: Fri Mar 15 10:21:18 2013
New Revision: 248318
URL: http://svnweb.freebsd.org/changeset/base/248318
Log:
Use m_get() and m_getcl() instead of compat macros.
Modified:
head/sys/kern/uipc_sockbuf.c
head/sys/nfs/nfs_common.c
head/sys/xdr/xdr_mbuf.c
Modified: head/sys/kern/uipc_sockbuf.c
==============================================================================
--- head/sys/kern/uipc_sockbuf.c Fri Mar 15 10:20:15 2013 (r248317)
+++ head/sys/kern/uipc_sockbuf.c Fri Mar 15 10:21:18 2013 (r248318)
@@ -644,8 +644,8 @@ sbappendaddr_locked(struct sockbuf *sb,
if (asa->sa_len > MLEN)
return (0);
#endif
- MGET(m, M_NOWAIT, MT_SONAME);
- if (m == 0)
+ m = m_get(M_NOWAIT, MT_SONAME);
+ if (m == NULL)
return (0);
m->m_len = asa->sa_len;
bcopy(asa, mtod(m, caddr_t), asa->sa_len);
Modified: head/sys/nfs/nfs_common.c
==============================================================================
--- head/sys/nfs/nfs_common.c Fri Mar 15 10:20:15 2013 (r248317)
+++ head/sys/nfs/nfs_common.c Fri Mar 15 10:21:18 2013 (r248318)
@@ -192,7 +192,7 @@ nfsm_disct(struct mbuf **mdp, caddr_t *d
} else if (siz > MHLEN) {
panic("nfs S too big");
} else {
- MGET(mp2, how, MT_DATA);
+ mp2 = m_get(how, MT_DATA);
if (mp2 == NULL)
return (NULL);
mp2->m_len = siz;
@@ -266,7 +266,7 @@ nfsm_build_xx(int s, struct mbuf **mb, c
void *ret;
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;
Modified: head/sys/xdr/xdr_mbuf.c
==============================================================================
--- head/sys/xdr/xdr_mbuf.c Fri Mar 15 10:20:15 2013 (r248317)
+++ head/sys/xdr/xdr_mbuf.c Fri Mar 15 10:21:18 2013 (r248318)
@@ -123,7 +123,7 @@ xdrmbuf_getall(XDR *xdrs)
if (m)
m_adj(m, xdrs->x_handy);
else
- MGET(m, M_WAITOK, MT_DATA);
+ m = m_get(M_WAITOK, MT_DATA);
return (m);
}
@@ -228,9 +228,10 @@ xdrmbuf_putbytes(XDR *xdrs, const char *
if (xdrs->x_handy == m->m_len && M_TRAILINGSPACE(m) == 0) {
if (!m->m_next) {
- MGET(n, M_WAITOK, m->m_type);
if (m->m_flags & M_EXT)
- MCLGET(n, M_WAITOK);
+ n = m_getcl(M_WAITOK, m->m_type, 0);
+ else
+ n = m_get(M_WAITOK, m->m_type);
m->m_next = n;
}
m = m->m_next;
More information about the svn-src-all
mailing list