]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/nfsd/nfssvc.c
sunrpc: properly type pc_encode callbacks
[linux.git] / fs / nfsd / nfssvc.c
index 59979f0bbd4bf255f5ea6f8fbd33cb9b2a5aa073..5552336641246e376573956bfa667d2d4cea3c3a 100644 (file)
@@ -782,7 +782,6 @@ int
 nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
 {
        struct svc_procedure    *proc;
-       kxdrproc_t              xdr;
        __be32                  nfserr;
        __be32                  *nfserrp;
 
@@ -801,9 +800,8 @@ nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
         */
        rqstp->rq_cachetype = proc->pc_cachetype;
        /* Decode arguments */
-       xdr = proc->pc_decode;
-       if (xdr && !xdr(rqstp, (__be32*)rqstp->rq_arg.head[0].iov_base,
-                       rqstp->rq_argp)) {
+       if (proc->pc_decode &&
+           !proc->pc_decode(rqstp, (__be32*)rqstp->rq_arg.head[0].iov_base)) {
                dprintk("nfsd: failed to decode arguments!\n");
                *statp = rpc_garbage_args;
                return 1;
@@ -827,7 +825,7 @@ nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
        rqstp->rq_res.head[0].iov_len += sizeof(__be32);
 
        /* Now call the procedure handler, and encode NFS status. */
-       nfserr = proc->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp);
+       nfserr = proc->pc_func(rqstp);
        nfserr = map_new_errors(rqstp->rq_vers, nfserr);
        if (nfserr == nfserr_dropit || test_bit(RQ_DROPME, &rqstp->rq_flags)) {
                dprintk("nfsd: Dropping request; may be revisited later\n");
@@ -842,9 +840,7 @@ nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
         * For NFSv2, additional info is never returned in case of an error.
         */
        if (!(nfserr && rqstp->rq_vers == 2)) {
-               xdr = proc->pc_encode;
-               if (xdr && !xdr(rqstp, nfserrp,
-                               rqstp->rq_resp)) {
+               if (proc->pc_encode && !proc->pc_encode(rqstp, nfserrp)) {
                        /* Failed to encode result. Release cache entry */
                        dprintk("nfsd: failed to encode result!\n");
                        nfsd_cache_update(rqstp, RC_NOCACHE, NULL);