svn commit: r276780 - in head/sys: fs/nfs fs/nfsserver nfsserver
Robert Watson
rwatson at FreeBSD.org
Wed Jan 7 17:22:58 UTC 2015
Author: rwatson
Date: Wed Jan 7 17:22:56 2015
New Revision: 276780
URL: https://svnweb.freebsd.org/changeset/base/276780
Log:
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
Modified:
head/sys/fs/nfs/nfsm_subs.h
head/sys/fs/nfsserver/nfs_nfsdport.c
head/sys/nfsserver/nfsm_subs.h
Modified: head/sys/fs/nfs/nfsm_subs.h
==============================================================================
--- head/sys/fs/nfs/nfsm_subs.h Wed Jan 7 16:55:55 2015 (r276779)
+++ head/sys/fs/nfs/nfsm_subs.h Wed Jan 7 17:22:56 2015 (r276780)
@@ -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)
/*
Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdport.c Wed Jan 7 16:55:55 2015 (r276779)
+++ head/sys/fs/nfsserver/nfs_nfsdport.c Wed Jan 7 17:22:56 2015 (r276780)
@@ -575,7 +575,7 @@ nfsvno_readlink(struct vnode *vp, struct
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 {
Modified: head/sys/nfsserver/nfsm_subs.h
==============================================================================
--- head/sys/nfsserver/nfsm_subs.h Wed Jan 7 16:55:55 2015 (r276779)
+++ head/sys/nfsserver/nfsm_subs.h Wed Jan 7 17:22:56 2015 (r276780)
@@ -47,14 +47,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))
-
-/*
* Now for the macros that do the simple stuff and call the functions
* for the hard stuff.
* These macros use several vars. declared in nfsm_reqhead and these
More information about the svn-src-all
mailing list