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:
parent
1c15a29600
commit
eae6da3db4
@ -46,9 +46,6 @@
|
|||||||
/*
|
/*
|
||||||
* First define what the actual subs. return
|
* 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)
|
#define NFSM_DATAP(m, s) (m)->m_data += (s)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -575,7 +575,7 @@ nfsvno_readlink(struct vnode *vp, struct ucred *cred, struct thread *p,
|
|||||||
while (len < NFS_MAXPATHLEN) {
|
while (len < NFS_MAXPATHLEN) {
|
||||||
NFSMGET(mp);
|
NFSMGET(mp);
|
||||||
MCLGET(mp, M_WAITOK);
|
MCLGET(mp, M_WAITOK);
|
||||||
mp->m_len = NFSMSIZ(mp);
|
mp->m_len = M_SIZE(mp);
|
||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
mp3 = mp2 = mp;
|
mp3 = mp2 = mp;
|
||||||
} else {
|
} else {
|
||||||
|
@ -46,14 +46,6 @@
|
|||||||
* other purpose will be dangerous. (they make weird assumptions)
|
* 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
|
* Now for the macros that do the simple stuff and call the functions
|
||||||
* for the hard stuff.
|
* for the hard stuff.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user