summaryrefslogtreecommitdiffstats
path: root/net
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 /net
parentcc6acc20a606f9ca65a6338af8204b7ae9e67b1a (diff)
downloadlinux-d16d1867215663907f3212590d1a9d32398a0f47.tar.gz
linux-d16d1867215663907f3212590d1a9d32398a0f47.tar.bz2
linux-d16d1867215663907f3212590d1a9d32398a0f47.zip
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 'net')
-rw-r--r--net/sunrpc/svc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 18024c1b9b7b..aa643a29fdc6 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -1154,7 +1154,6 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
struct svc_version *versp = NULL; /* compiler food */
struct svc_procedure *procp = NULL;
struct svc_serv *serv = rqstp->rq_server;
- kxdrproc_t xdr;
__be32 *statp;
u32 prog, vers, proc;
__be32 auth_stat, rpc_stat;
@@ -1298,9 +1297,8 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
procp->pc_release(rqstp);
goto err_bad_auth;
}
- if (*statp == rpc_success &&
- (xdr = procp->pc_encode) &&
- !xdr(rqstp, resv->iov_base+resv->iov_len, rqstp->rq_resp)) {
+ if (*statp == rpc_success && procp->pc_encode &&
+ !procp->pc_encode(rqstp, resv->iov_base + resv->iov_len)) {
dprintk("svc: failed to encode reply\n");
/* serv->sv_stats->rpcsystemerr++; */
*statp = rpc_system_err;