summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4proc.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-05-08 17:35:49 +0200
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2017-07-13 15:57:59 -0400
commit1c8a5409f3c4748ff42c1721d9578dd03091f378 (patch)
tree70ff6480826a2120ee50aef20a9cdf0a2935ee2b /fs/nfsd/nfs4proc.c
parent36ba89c2a40fe138898b394106205a3853ef2a4d (diff)
downloadlinux-1c8a5409f3c4748ff42c1721d9578dd03091f378.tar.gz
linux-1c8a5409f3c4748ff42c1721d9578dd03091f378.tar.bz2
linux-1c8a5409f3c4748ff42c1721d9578dd03091f378.zip
sunrpc: properly type pc_func callbacks
Drop the argp and resp arguments as they can trivially be derived from the rqstp argument. With that all functions now have the same prototype, and we can remove the unsafe casting to svc_procfunc as well as the svc_procfunc typedef itself. Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r--fs/nfsd/nfs4proc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 0833686ccdd3..43b2e5ab4430 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -1510,7 +1510,7 @@ out:
* NULL call.
*/
static __be32
-nfsd4_proc_null(struct svc_rqst *rqstp, void *argp, void *resp)
+nfsd4_proc_null(struct svc_rqst *rqstp)
{
return nfs_ok;
}
@@ -1524,6 +1524,7 @@ static inline void nfsd4_increment_op_stats(u32 opnum)
typedef __be32(*nfsd4op_func)(struct svc_rqst *, struct nfsd4_compound_state *,
void *);
typedef u32(*nfsd4op_rsize)(struct svc_rqst *, struct nfsd4_op *op);
+
typedef void(*stateid_setter)(struct nfsd4_compound_state *, void *);
typedef void(*stateid_getter)(struct nfsd4_compound_state *, void *);
@@ -1673,10 +1674,10 @@ static void svcxdr_init_encode(struct svc_rqst *rqstp,
* COMPOUND call.
*/
static __be32
-nfsd4_proc_compound(struct svc_rqst *rqstp, void *arg, void *res)
+nfsd4_proc_compound(struct svc_rqst *rqstp)
{
- struct nfsd4_compoundargs *args = arg;
- struct nfsd4_compoundres *resp = res;
+ struct nfsd4_compoundargs *args = rqstp->rq_argp;
+ struct nfsd4_compoundres *resp = rqstp->rq_resp;
struct nfsd4_op *op;
struct nfsd4_operation *opdesc;
struct nfsd4_compound_state *cstate = &resp->cstate;