diff options
author | Christoph Hellwig <hch@lst.de> | 2017-05-08 19:42:02 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-05-15 17:42:25 +0200 |
commit | 63f8de37951a64cc24479eafd33085537e088075 (patch) | |
tree | e572e2542ef9370c9dfec6795660d52b72f77712 /fs/nfsd/nfssvc.c | |
parent | 026fec7e7c4723b5f26a753bbcad69f68c8299d4 (diff) | |
download | linux-next-63f8de37951a64cc24479eafd33085537e088075.tar.gz |
sunrpc: properly type pc_encode callbacks
Drop the resp argument as it 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 kxdrproc_t.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfsd/nfssvc.c')
-rw-r--r-- | fs/nfsd/nfssvc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index 3e00499d7ad7..555233664124 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -782,7 +782,6 @@ int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp) { struct svc_procedure *proc; - kxdrproc_t xdr; __be32 nfserr; __be32 *nfserrp; @@ -841,9 +840,7 @@ nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp) * For NFSv2, additional info is never returned in case of an error. */ if (!(nfserr && rqstp->rq_vers == 2)) { - xdr = proc->pc_encode; - if (xdr && !xdr(rqstp, nfserrp, - rqstp->rq_resp)) { + if (proc->pc_encode && !proc->pc_encode(rqstp, nfserrp)) { /* Failed to encode result. Release cache entry */ dprintk("nfsd: failed to encode result!\n"); nfsd_cache_update(rqstp, RC_NOCACHE, NULL); |