summaryrefslogtreecommitdiff
path: root/net/sunrpc
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-05-08 19:01:48 +0200
committerChristoph Hellwig <hch@lst.de>2017-05-15 17:42:24 +0200
commit026fec7e7c4723b5f26a753bbcad69f68c8299d4 (patch)
treeef9d60d345e80aa9823dfa3e2405e9ec09459d0d /net/sunrpc
parent8537488b5a2f33980e33f654b0a515304de2b267 (diff)
sunrpc: properly type pc_decode callbacks
Drop the argp 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>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/svc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 4611cb7adc04..18024c1b9b7b 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -1276,9 +1276,12 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
/* Call the function that processes the request. */
if (!versp->vs_dispatch) {
- /* Decode arguments */
- xdr = procp->pc_decode;
- if (xdr && !xdr(rqstp, argv->iov_base, rqstp->rq_argp))
+ /*
+ * Decode arguments
+ * XXX: why do we ignore the return value?
+ */
+ if (procp->pc_decode &&
+ !procp->pc_decode(rqstp, argv->iov_base))
goto err_garbage;
*statp = procp->pc_func(rqstp);