aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4callback.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfs4callback.c')
-rw-r--r--fs/nfsd/nfs4callback.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 6529534d7aae..c363efda8ecf 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -499,34 +499,28 @@ out_default:
499/* 499/*
500 * NB: Without this zero space reservation, callbacks over krb5p fail 500 * NB: Without this zero space reservation, callbacks over krb5p fail
501 */ 501 */
502static int nfs4_xdr_enc_cb_null(struct rpc_rqst *req, __be32 *p, void *__unused) 502static void nfs4_xdr_enc_cb_null(struct rpc_rqst *req, struct xdr_stream *xdr,
503 void *__unused)
503{ 504{
504 struct xdr_stream xdrs, *xdr = &xdrs;
505
506 xdr_init_encode(&xdrs, &req->rq_snd_buf, p);
507 xdr_reserve_space(xdr, 0); 505 xdr_reserve_space(xdr, 0);
508 return 0;
509} 506}
510 507
511/* 508/*
512 * 20.2. Operation 4: CB_RECALL - Recall a Delegation 509 * 20.2. Operation 4: CB_RECALL - Recall a Delegation
513 */ 510 */
514static int nfs4_xdr_enc_cb_recall(struct rpc_rqst *req, __be32 *p, 511static void nfs4_xdr_enc_cb_recall(struct rpc_rqst *req, struct xdr_stream *xdr,
515 const struct nfsd4_callback *cb) 512 const struct nfsd4_callback *cb)
516{ 513{
517 struct xdr_stream xdr;
518 const struct nfs4_delegation *args = cb->cb_op; 514 const struct nfs4_delegation *args = cb->cb_op;
519 struct nfs4_cb_compound_hdr hdr = { 515 struct nfs4_cb_compound_hdr hdr = {
520 .ident = cb->cb_clp->cl_cb_ident, 516 .ident = cb->cb_clp->cl_cb_ident,
521 .minorversion = cb->cb_minorversion, 517 .minorversion = cb->cb_minorversion,
522 }; 518 };
523 519
524 xdr_init_encode(&xdr, &req->rq_snd_buf, p); 520 encode_cb_compound4args(xdr, &hdr);
525 encode_cb_compound4args(&xdr, &hdr); 521 encode_cb_sequence4args(xdr, cb, &hdr);
526 encode_cb_sequence4args(&xdr, cb, &hdr); 522 encode_cb_recall4args(xdr, args, &hdr);
527 encode_cb_recall4args(&xdr, args, &hdr);
528 encode_cb_nops(&hdr); 523 encode_cb_nops(&hdr);
529 return 0;
530} 524}
531 525
532 526
@@ -583,7 +577,7 @@ out_default:
583#define PROC(proc, call, argtype, restype) \ 577#define PROC(proc, call, argtype, restype) \
584[NFSPROC4_CLNT_##proc] = { \ 578[NFSPROC4_CLNT_##proc] = { \
585 .p_proc = NFSPROC4_CB_##call, \ 579 .p_proc = NFSPROC4_CB_##call, \
586 .p_encode = (kxdrproc_t)nfs4_xdr_enc_##argtype, \ 580 .p_encode = (kxdreproc_t)nfs4_xdr_enc_##argtype, \
587 .p_decode = (kxdrproc_t)nfs4_xdr_dec_##restype, \ 581 .p_decode = (kxdrproc_t)nfs4_xdr_dec_##restype, \
588 .p_arglen = NFS4_enc_##argtype##_sz, \ 582 .p_arglen = NFS4_enc_##argtype##_sz, \
589 .p_replen = NFS4_dec_##restype##_sz, \ 583 .p_replen = NFS4_dec_##restype##_sz, \