nfsd4: call nfsd4_release_compoundargs from pc_release
[deliverable/linux.git] / fs / nfsd / nfs4xdr.c
index a8d83bd5c1d5c5d5681f0a26d0e991afb325041a..c43f56021501d655ff0a67d4ffe9482b25cec239 100644 (file)
@@ -3428,8 +3428,11 @@ nfs4svc_encode_voidres(struct svc_rqst *rqstp, __be32 *p, void *dummy)
         return xdr_ressize_check(rqstp, p);
 }
 
-void nfsd4_release_compoundargs(struct nfsd4_compoundargs *args)
+int nfsd4_release_compoundargs(void *rq, __be32 *p, void *resp)
 {
+       struct svc_rqst *rqstp = rq;
+       struct nfsd4_compoundargs *args = rqstp->rq_argp;
+
        if (args->ops != args->iops) {
                kfree(args->ops);
                args->ops = args->iops;
@@ -3442,13 +3445,12 @@ void nfsd4_release_compoundargs(struct nfsd4_compoundargs *args)
                tb->release(tb->buf);
                kfree(tb);
        }
+       return 1;
 }
 
 int
 nfs4svc_decode_compoundargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compoundargs *args)
 {
-       __be32 status;
-
        args->p = p;
        args->end = rqstp->rq_arg.head[0].iov_base + rqstp->rq_arg.head[0].iov_len;
        args->pagelist = rqstp->rq_arg.pages;
@@ -3458,11 +3460,7 @@ nfs4svc_decode_compoundargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_comp
        args->ops = args->iops;
        args->rqstp = rqstp;
 
-       status = nfsd4_decode_compound(args);
-       if (status) {
-               nfsd4_release_compoundargs(args);
-       }
-       return !status;
+       return !nfsd4_decode_compound(args);
 }
 
 int
This page took 0.023581 seconds and 5 git commands to generate.