summaryrefslogtreecommitdiff
path: root/fs/nfsd/nfssvc.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-05-08 19:42:02 +0200
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2017-07-13 15:58:00 -0400
commitd16d1867215663907f3212590d1a9d32398a0f47 (patch)
tree5da7e12080ac7bfc49428b26a211c4425c14558c /fs/nfsd/nfssvc.c
parentcc6acc20a606f9ca65a6338af8204b7ae9e67b1a (diff)
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.c5
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);