aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/clntxdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/lockd/clntxdr.c')
-rw-r--r--fs/lockd/clntxdr.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/fs/lockd/clntxdr.c b/fs/lockd/clntxdr.c
index c6fda8fb1c5b..180ac34feb9a 100644
--- a/fs/lockd/clntxdr.c
+++ b/fs/lockd/clntxdr.c
@@ -527,17 +527,16 @@ out:
527 return error; 527 return error;
528} 528}
529 529
530static int nlm_xdr_dec_testres(struct rpc_rqst *req, __be32 *p, 530static int nlm_xdr_dec_testres(struct rpc_rqst *req,
531 struct xdr_stream *xdr,
531 struct nlm_res *result) 532 struct nlm_res *result)
532{ 533{
533 struct xdr_stream xdr;
534 int error; 534 int error;
535 535
536 xdr_init_decode(&xdr, &req->rq_rcv_buf, p); 536 error = decode_cookie(xdr, &result->cookie);
537 error = decode_cookie(&xdr, &result->cookie);
538 if (unlikely(error)) 537 if (unlikely(error))
539 goto out; 538 goto out;
540 error = decode_nlm_testrply(&xdr, result); 539 error = decode_nlm_testrply(xdr, result);
541out: 540out:
542 return error; 541 return error;
543} 542}
@@ -548,17 +547,16 @@ out:
548 * nlm_stat stat; 547 * nlm_stat stat;
549 * }; 548 * };
550 */ 549 */
551static int nlm_xdr_dec_res(struct rpc_rqst *req, __be32 *p, 550static int nlm_xdr_dec_res(struct rpc_rqst *req,
551 struct xdr_stream *xdr,
552 struct nlm_res *result) 552 struct nlm_res *result)
553{ 553{
554 struct xdr_stream xdr;
555 int error; 554 int error;
556 555
557 xdr_init_decode(&xdr, &req->rq_rcv_buf, p); 556 error = decode_cookie(xdr, &result->cookie);
558 error = decode_cookie(&xdr, &result->cookie);
559 if (unlikely(error)) 557 if (unlikely(error))
560 goto out; 558 goto out;
561 error = decode_nlm_stat(&xdr, &result->status); 559 error = decode_nlm_stat(xdr, &result->status);
562out: 560out:
563 return error; 561 return error;
564} 562}
@@ -573,7 +571,7 @@ out:
573[NLMPROC_##proc] = { \ 571[NLMPROC_##proc] = { \
574 .p_proc = NLMPROC_##proc, \ 572 .p_proc = NLMPROC_##proc, \
575 .p_encode = (kxdreproc_t)nlm_xdr_enc_##argtype, \ 573 .p_encode = (kxdreproc_t)nlm_xdr_enc_##argtype, \
576 .p_decode = (kxdrproc_t)nlm_xdr_dec_##restype, \ 574 .p_decode = (kxdrdproc_t)nlm_xdr_dec_##restype, \
577 .p_arglen = NLM_##argtype##_sz, \ 575 .p_arglen = NLM_##argtype##_sz, \
578 .p_replen = NLM_##restype##_sz, \ 576 .p_replen = NLM_##restype##_sz, \
579 .p_statidx = NLMPROC_##proc, \ 577 .p_statidx = NLMPROC_##proc, \