kNFSd - 6 of 6 - Move SVCFH_fmt from being 'inline' to being 'extern'.
Subsystems (2)
PATCH 1/1 kNFSd - 6 of 6 - Move SVCFH_fmt from being 'inline' to being 'extern'.
This way, the "static char buf" is defined only once instead of once per file.
----------- Diffstat output ------------
./fs/nfsd/nfsfh.c | 18 ++++++++++++++++++ ./include/linux/nfsd/nfsfh.h | 17 ++--------------- 2 files changed, 20 insertions(+), 15 deletions(-)
fs/nfsd/nfsfh.c renamed from fs/nfsd/nfsfh.c~current~ +18 -0
@@ -489,3 +489,21 @@ fh_put(struct svc_fh *fhp)return ; } +/* +* Shorthand for dprintk()'s +*/ +char *SVCFH_fmt (struct svc_fh *fhp) +{ +struct knfsd_fh *fh = &fhp->fh_handle; + +static char buf[80 ]; +sprintf (buf,"%d: %08x %08x %08x %08x %08x %08x" , + fh->fh_size, + fh->fh_base.fh_pad[0 ], + fh->fh_base.fh_pad[1 ], + fh->fh_base.fh_pad[2 ], + fh->fh_base.fh_pad[3 ], + fh->fh_base.fh_pad[4 ], + fh->fh_base.fh_pad[5 ]); +return buf; +}
include/linux/nfsd/nfsfh.h renamed from include/linux/nfsd/nfsfh.h~current~ +2 -15
@@ -186,21 +186,8 @@ static inline void mk_fsid_v2(u32 *fsidv/* * Shorthand for dprintk()'s */ -inline static char *SVCFH_fmt (struct svc_fh *fhp) -{ -struct knfsd_fh *fh = &fhp->fh_handle; - -static char buf[80 ]; -sprintf (buf,"%d: %08x %08x %08x %08x %08x %08x" , - fh->fh_size, - fh->fh_base.fh_pad[0 ], - fh->fh_base.fh_pad[1 ], - fh->fh_base.fh_pad[2 ], - fh->fh_base.fh_pad[3 ], - fh->fh_base.fh_pad[4 ], - fh->fh_base.fh_pad[5 ]); -return buf; -} +extern char *SVCFH_fmt (struct svc_fh *fhp); +/* * Function prototypes */
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs