summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-05-08 19:01:48 +0200
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2017-07-13 15:58:00 -0400
commitcc6acc20a606f9ca65a6338af8204b7ae9e67b1a (patch)
treeffaf4738edc082371a54162e032bbef0155a64eb /net
parent1150ded804c2be6d02efef3e39e39e570c9cea21 (diff)
downloadlinux-stable-cc6acc20a606f9ca65a6338af8204b7ae9e67b1a.tar.gz
linux-stable-cc6acc20a606f9ca65a6338af8204b7ae9e67b1a.tar.bz2
linux-stable-cc6acc20a606f9ca65a6338af8204b7ae9e67b1a.zip
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')
-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);