Use M_SIZE() instead of hand-crafted (and mostly correct) NFSMSIZ() macro

in the NFS server; garbage collect now-unused NFSMSIZ() and M_HASCL()
macros.  Also garbage collect now-unused versions in headers for the
removed previous NFS client and server.

Reviewed by:	rmacklem
Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Robert Watson 2015-01-07 17:22:56 +00:00
parent 1c15a29600
commit eae6da3db4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276780
3 changed files with 1 additions and 12 deletions

View File

@ -46,9 +46,6 @@
/*
* First define what the actual subs. return
*/
#define M_HASCL(m) ((m)->m_flags & M_EXT)
#define NFSMSIZ(m) ((M_HASCL(m))?MCLBYTES: \
(((m)->m_flags & M_PKTHDR)?MHLEN:MLEN))
#define NFSM_DATAP(m, s) (m)->m_data += (s)
/*

View File

@ -575,7 +575,7 @@ nfsvno_readlink(struct vnode *vp, struct ucred *cred, struct thread *p,
while (len < NFS_MAXPATHLEN) {
NFSMGET(mp);
MCLGET(mp, M_WAITOK);
mp->m_len = NFSMSIZ(mp);
mp->m_len = M_SIZE(mp);
if (len == 0) {
mp3 = mp2 = mp;
} else {

View File

@ -46,14 +46,6 @@
* other purpose will be dangerous. (they make weird assumptions)
*/
/*
* First define what the actual subs. return
*/
#define M_HASCL(m) ((m)->m_flags & M_EXT)
#define NFSMSIZ(m) ((M_HASCL(m))?MCLBYTES: \
(((m)->m_flags & M_PKTHDR)?MHLEN:MLEN))
/*
* Now for the macros that do the simple stuff and call the functions
* for the hard stuff.