Commit dba5eaa4 authored by Chuck Lever's avatar Chuck Lever

SUNRPC: Push svcxdr_init_decode() into svc_process_common()

Now that all vs_dispatch functions invoke svcxdr_init_decode(), it
is common code and can be pushed down into the generic RPC server.
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent f78e4454
...@@ -695,7 +695,6 @@ static int nlmsvc_dispatch(struct svc_rqst *rqstp, __be32 *statp) ...@@ -695,7 +695,6 @@ static int nlmsvc_dispatch(struct svc_rqst *rqstp, __be32 *statp)
{ {
const struct svc_procedure *procp = rqstp->rq_procinfo; const struct svc_procedure *procp = rqstp->rq_procinfo;
svcxdr_init_decode(rqstp);
if (!procp->pc_decode(rqstp, &rqstp->rq_arg_stream)) if (!procp->pc_decode(rqstp, &rqstp->rq_arg_stream))
goto out_decode_err; goto out_decode_err;
......
...@@ -984,7 +984,6 @@ nfs_callback_dispatch(struct svc_rqst *rqstp, __be32 *statp) ...@@ -984,7 +984,6 @@ nfs_callback_dispatch(struct svc_rqst *rqstp, __be32 *statp)
{ {
const struct svc_procedure *procp = rqstp->rq_procinfo; const struct svc_procedure *procp = rqstp->rq_procinfo;
svcxdr_init_decode(rqstp);
svcxdr_init_encode(rqstp); svcxdr_init_encode(rqstp);
*statp = procp->pc_func(rqstp); *statp = procp->pc_func(rqstp);
......
...@@ -1040,7 +1040,6 @@ int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp) ...@@ -1040,7 +1040,6 @@ int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
*/ */
rqstp->rq_cachetype = proc->pc_cachetype; rqstp->rq_cachetype = proc->pc_cachetype;
svcxdr_init_decode(rqstp);
if (!proc->pc_decode(rqstp, &rqstp->rq_arg_stream)) if (!proc->pc_decode(rqstp, &rqstp->rq_arg_stream))
goto out_decode_err; goto out_decode_err;
......
...@@ -1302,6 +1302,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv) ...@@ -1302,6 +1302,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
if (progp == NULL) if (progp == NULL)
goto err_bad_prog; goto err_bad_prog;
svcxdr_init_decode(rqstp);
rpc_stat = progp->pg_init_request(rqstp, progp, &process); rpc_stat = progp->pg_init_request(rqstp, progp, &process);
switch (rpc_stat) { switch (rpc_stat) {
case rpc_success: case rpc_success:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment