diff options
author | Christoph Hellwig <hch@lst.de> | 2017-05-08 19:01:48 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-05-15 17:42:24 +0200 |
commit | 026fec7e7c4723b5f26a753bbcad69f68c8299d4 (patch) | |
tree | ef9d60d345e80aa9823dfa3e2405e9ec09459d0d /net | |
parent | sunrpc: properly type pc_release callbacks (diff) | |
download | linux-026fec7e7c4723b5f26a753bbcad69f68c8299d4.tar.xz linux-026fec7e7c4723b5f26a753bbcad69f68c8299d4.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.c | 9 |
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); |