summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4callback.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2010-12-14 14:59:29 +0000
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-12-16 12:37:25 -0500
commitbf2695516db982e90a22fc94f93491b481796bb1 (patch)
tree367bf134ef892bfc3fcd2c4fe676b14102d97467 /fs/nfsd/nfs4callback.c
parent9f06c719f474be7003763284a990bed6377bb0d4 (diff)
downloadop-kernel-dev-bf2695516db982e90a22fc94f93491b481796bb1.zip
op-kernel-dev-bf2695516db982e90a22fc94f93491b481796bb1.tar.gz
SUNRPC: New xdr_streams XDR decoder API
Now that all client-side XDR decoder routines use xdr_streams, there should be no need to support the legacy calling sequence [rpc_rqst *, __be32 *, RPC res *] anywhere. We can construct an xdr_stream in the generic RPC code, instead of in each decoder function. This is a refactoring change. It should not cause different behavior. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfsd/nfs4callback.c')
-rw-r--r--fs/nfsd/nfs4callback.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index c363efd..21a63da 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -533,7 +533,8 @@ static void nfs4_xdr_enc_cb_recall(struct rpc_rqst *req, struct xdr_stream *xdr,
* Protocol".
*/
-static int nfs4_xdr_dec_cb_null(struct rpc_rqst *req, __be32 *p, void *__unused)
+static int nfs4_xdr_dec_cb_null(struct rpc_rqst *req, struct xdr_stream *xdr,
+ void *__unused)
{
return 0;
}
@@ -541,26 +542,25 @@ static int nfs4_xdr_dec_cb_null(struct rpc_rqst *req, __be32 *p, void *__unused)
/*
* 20.2. Operation 4: CB_RECALL - Recall a Delegation
*/
-static int nfs4_xdr_dec_cb_recall(struct rpc_rqst *rqstp, __be32 *p,
+static int nfs4_xdr_dec_cb_recall(struct rpc_rqst *rqstp,
+ struct xdr_stream *xdr,
struct nfsd4_callback *cb)
{
- struct xdr_stream xdr;
struct nfs4_cb_compound_hdr hdr;
enum nfsstat4 nfserr;
int status;
- xdr_init_decode(&xdr, &rqstp->rq_rcv_buf, p);
- status = decode_cb_compound4res(&xdr, &hdr);
+ status = decode_cb_compound4res(xdr, &hdr);
if (unlikely(status))
goto out;
if (cb != NULL) {
- status = decode_cb_sequence4res(&xdr, cb);
+ status = decode_cb_sequence4res(xdr, cb);
if (unlikely(status))
goto out;
}
- status = decode_cb_op_status(&xdr, OP_CB_RECALL, &nfserr);
+ status = decode_cb_op_status(xdr, OP_CB_RECALL, &nfserr);
if (unlikely(status))
goto out;
if (unlikely(nfserr != NFS4_OK))
@@ -578,7 +578,7 @@ out_default:
[NFSPROC4_CLNT_##proc] = { \
.p_proc = NFSPROC4_CB_##call, \
.p_encode = (kxdreproc_t)nfs4_xdr_enc_##argtype, \
- .p_decode = (kxdrproc_t)nfs4_xdr_dec_##restype, \
+ .p_decode = (kxdrdproc_t)nfs4_xdr_dec_##restype, \
.p_arglen = NFS4_enc_##argtype##_sz, \
.p_replen = NFS4_dec_##restype##_sz, \
.p_statidx = NFSPROC4_CB_##call, \
OpenPOWER on IntegriCloud