nfsd: use named initializers in PROC()
authorChristoph Hellwig <hch@lst.de>
Mon, 8 May 2017 15:59:13 +0000 (17:59 +0200)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 13 Jul 2017 19:57:58 +0000 (15:57 -0400)
Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/nfsd/nfs2acl.c
fs/nfsd/nfs3acl.c
fs/nfsd/nfs4proc.c

index 838f90f3f890a00f0f0989e5c3abb79e20b273d0..12933d07204c49becec2aa7ba164562496a32729 100644 (file)
@@ -345,17 +345,17 @@ static int nfsaclsvc_release_access(struct svc_rqst *rqstp, __be32 *p,
 #define nfsd3_voidres          nfsd3_voidargs
 struct nfsd3_voidargs { int dummy; };
 
-#define PROC(name, argt, rest, relt, cache, respsize)  \
- { (svc_procfunc) nfsacld_proc_##name,         \
-   (kxdrproc_t) nfsaclsvc_decode_##argt##args, \
-   (kxdrproc_t) nfsaclsvc_encode_##rest##res,  \
-   (kxdrproc_t) nfsaclsvc_release_##relt,              \
-   sizeof(struct nfsd3_##argt##args),          \
-   sizeof(struct nfsd3_##rest##res),           \
-   0,                                          \
-   cache,                                      \
-   respsize,                                   \
- }
+#define PROC(name, argt, rest, relt, cache, respsize)                  \
+{                                                                      \
+       .pc_func        = (svc_procfunc) nfsacld_proc_##name,           \
+       .pc_decode      = (kxdrproc_t) nfsaclsvc_decode_##argt##args,   \
+       .pc_encode      = (kxdrproc_t) nfsaclsvc_encode_##rest##res,    \
+       .pc_release     = (kxdrproc_t) nfsaclsvc_release_##relt,        \
+       .pc_argsize     = sizeof(struct nfsd3_##argt##args),            \
+       .pc_ressize     = sizeof(struct nfsd3_##rest##res),             \
+       .pc_cachetype   = cache,                                        \
+       .pc_xdrressize  = respsize,                                     \
+}
 
 #define ST 1           /* status*/
 #define AT 21          /* attributes */
index dcb5f79076c0cb3cb12400575cb7e3d3cfa9e26d..db988a229b3a3ac7bc70ed2cc370fd5a37afc1aa 100644 (file)
@@ -237,17 +237,17 @@ static int nfs3svc_release_getacl(struct svc_rqst *rqstp, __be32 *p,
 #define nfsd3_voidres                  nfsd3_voidargs
 struct nfsd3_voidargs { int dummy; };
 
-#define PROC(name, argt, rest, relt, cache, respsize)  \
- { (svc_procfunc) nfsd3_proc_##name,           \
-   (kxdrproc_t) nfs3svc_decode_##argt##args,   \
-   (kxdrproc_t) nfs3svc_encode_##rest##res,    \
-   (kxdrproc_t) nfs3svc_release_##relt,                \
-   sizeof(struct nfsd3_##argt##args),          \
-   sizeof(struct nfsd3_##rest##res),           \
-   0,                                          \
-   cache,                                      \
-   respsize,                                   \
- }
+#define PROC(name, argt, rest, relt, cache, respsize)                  \
+{                                                                      \
+       .pc_func        = (svc_procfunc) nfsd3_proc_##name,             \
+       .pc_decode      = (kxdrproc_t) nfs3svc_decode_##argt##args,     \
+       .pc_encode      = (kxdrproc_t) nfs3svc_encode_##rest##res,      \
+       .pc_release     = (kxdrproc_t) nfs3svc_release_##relt,          \
+       .pc_argsize     = sizeof(struct nfsd3_##argt##args),            \
+       .pc_ressize     = sizeof(struct nfsd3_##rest##res),             \
+       .pc_cachetype   = cache,                                        \
+       .pc_xdrressize  = respsize,                                     \
+}
 
 #define ST 1           /* status*/
 #define AT 21          /* attributes */
index dadb3bf305b22f352a3f91a2df06b30284b4891c..0833686ccdd3c58326037748f568cc2077756522 100644 (file)
@@ -1673,10 +1673,10 @@ static void svcxdr_init_encode(struct svc_rqst *rqstp,
  * COMPOUND call.
  */
 static __be32
-nfsd4_proc_compound(struct svc_rqst *rqstp,
-                   struct nfsd4_compoundargs *args,
-                   struct nfsd4_compoundres *resp)
+nfsd4_proc_compound(struct svc_rqst *rqstp, void *arg, void *res)
 {
+       struct nfsd4_compoundargs *args = arg;
+       struct nfsd4_compoundres *resp = res;
        struct nfsd4_op *op;
        struct nfsd4_operation *opdesc;
        struct nfsd4_compound_state *cstate = &resp->cstate;
@@ -2517,7 +2517,7 @@ struct nfsd4_voidargs { int dummy; };
 
 static struct svc_procedure            nfsd_procedures4[2] = {
        [NFSPROC4_NULL] = {
-               .pc_func = (svc_procfunc) nfsd4_proc_null,
+               .pc_func = nfsd4_proc_null,
                .pc_encode = (kxdrproc_t) nfs4svc_encode_voidres,
                .pc_argsize = sizeof(struct nfsd4_voidargs),
                .pc_ressize = sizeof(struct nfsd4_voidres),
@@ -2525,7 +2525,7 @@ static struct svc_procedure               nfsd_procedures4[2] = {
                .pc_xdrressize = 1,
        },
        [NFSPROC4_COMPOUND] = {
-               .pc_func = (svc_procfunc) nfsd4_proc_compound,
+               .pc_func = nfsd4_proc_compound,
                .pc_decode = (kxdrproc_t) nfs4svc_decode_compoundargs,
                .pc_encode = (kxdrproc_t) nfs4svc_encode_compoundres,
                .pc_argsize = sizeof(struct nfsd4_compoundargs),