NFS: kill off complicated macro 'PROC'

Previous thread: nfsd41: Remove ip address collision detection case by Linux Kernel Mailing List on Monday, June 22, 2009 - 2:05 pm. (1 message)

Next thread: nfsd41: move channel attributes from nfsd4_session to a nfsd4_channel_attr struct by Linux Kernel Mailing List on Monday, June 22, 2009 - 2:05 pm. (1 message)
From: Linux Kernel Mailing List
Date: Monday, June 22, 2009 - 2:05 pm

Gitweb:     http://git.kernel.org/linus/b9081d90f5b989cd927052084b16b4f950c8c8d7
Commit:     b9081d90f5b989cd927052084b16b4f950c8c8d7
Parent:     59fb30660be3f3ead54b3850c401d462449caaaa
Author:     Yu Zhiguo <yuzg@cn.fujitsu.com>
AuthorDate: Tue Jun 9 17:33:34 2009 +0800
Committer:  J. Bruce Fields <bfields@citi.umich.edu>
CommitDate: Mon Jun 15 19:34:32 2009 -0700

    NFS: kill off complicated macro 'PROC'
    
    kill off obscure macro 'PROC' of NFSv2&3 in order to make the code more clear.
    
    Among other things, this makes it simpler to grep for callers of these
    functions--something which has frequently caused confusion among nfs
    developers.
    
    Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
    Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
---
 fs/nfsd/nfs3proc.c |  237 ++++++++++++++++++++++++++++++++++++++++++++++-----
 fs/nfsd/nfsproc.c  |  198 ++++++++++++++++++++++++++++++++++++-------
 2 files changed, 379 insertions(+), 56 deletions(-)

diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c
index 7c9fe83..a713c41 100644
--- a/fs/nfsd/nfs3proc.c
+++ b/fs/nfsd/nfs3proc.c
@@ -652,8 +652,6 @@ nfsd3_proc_commit(struct svc_rqst * rqstp, struct nfsd3_commitargs *argp,
  * NFSv3 Server procedures.
  * Only the results of non-idempotent operations are cached.
  */
-#define nfs3svc_decode_voidargs		NULL
-#define nfs3svc_release_void		NULL
 #define nfs3svc_decode_fhandleargs	nfs3svc_decode_fhandle
 #define nfs3svc_encode_attrstatres	nfs3svc_encode_attrstat
 #define nfs3svc_encode_wccstatres	nfs3svc_encode_wccstat
@@ -686,28 +684,219 @@ struct nfsd3_voidargs { int dummy; };
 #define WC (7+pAT)	/* WCC attributes */
 
 static struct svc_procedure		nfsd_procedures3[22] = {
-  PROC(null,	 void,		void,		void,	  RC_NOCACHE, ST),
-  PROC(getattr,	 fhandle,	attrstat,	fhandle,  RC_NOCACHE, ST+AT),
-  PROC(setattr,  sattr,		wccstat,	fhandle,  RC_REPLBUFF, ST+WC),
-  PROC(lookup,	 dirop,		dirop,		fhandle2, RC_NOCACHE, ST+FH+pAT+pAT),
-  ...
Previous thread: nfsd41: Remove ip address collision detection case by Linux Kernel Mailing List on Monday, June 22, 2009 - 2:05 pm. (1 message)

Next thread: nfsd41: move channel attributes from nfsd4_session to a nfsd4_channel_attr struct by Linux Kernel Mailing List on Monday, June 22, 2009 - 2:05 pm. (1 message)