Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259056
b: refs/heads/master
c: 3e98abf
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed Jul 18, 2011
1 parent fb7b98d commit 0e005cc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ab1350b2b3c1dd2e465a6abdda608d8c44facfb8
refs/heads/master: 3e98abffd1665b884a322aedcd528577842f762f
2 changes: 1 addition & 1 deletion trunk/fs/nfsd/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,6 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
fh_put(&resp->cstate.save_fh);
BUG_ON(resp->cstate.replay_owner);
out:
nfsd4_release_compoundargs(args);
/* Reset deferral mechanism for RPC deferrals */
rqstp->rq_usedeferral = 1;
dprintk("nfsv4 compound returned %d\n", ntohl(status));
Expand Down Expand Up @@ -1473,6 +1472,7 @@ static struct svc_procedure nfsd_procedures4[2] = {
.pc_encode = (kxdrproc_t) nfs4svc_encode_compoundres,
.pc_argsize = sizeof(struct nfsd4_compoundargs),
.pc_ressize = sizeof(struct nfsd4_compoundres),
.pc_release = nfsd4_release_compoundargs,
.pc_cachetype = RC_NOCACHE,
.pc_xdrressize = NFSD_BUFSIZE/4,
},
Expand Down
14 changes: 6 additions & 8 deletions trunk/fs/nfsd/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/nfsd/xdr4.h
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ extern __be32
nfsd4_release_lockowner(struct svc_rqst *rqstp,
struct nfsd4_compound_state *,
struct nfsd4_release_lockowner *rlockowner);
extern void nfsd4_release_compoundargs(struct nfsd4_compoundargs *);
extern int nfsd4_release_compoundargs(void *rq, __be32 *p, void *resp);
extern __be32 nfsd4_delegreturn(struct svc_rqst *rqstp,
struct nfsd4_compound_state *, struct nfsd4_delegreturn *dr);
extern __be32 nfsd4_renew(struct svc_rqst *rqstp,
Expand Down

0 comments on commit 0e005cc

Please sign in to comment.