diff options
author | J. Bruce Fields <bfields@redhat.com> | 2014-03-11 17:54:34 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-05-30 17:31:53 -0400 |
commit | a8095f7e80fbf3e0efe4ee5cd3f509113c56290f (patch) | |
tree | d44c77ac05bd42e6e054bd8b4cf356d5703d14a8 /fs/nfsd/nfs4proc.c | |
parent | ea8d7720b274607f48fb524337254a9c43dbc2df (diff) | |
download | linux-a8095f7e80fbf3e0efe4ee5cd3f509113c56290f.tar.gz linux-a8095f7e80fbf3e0efe4ee5cd3f509113c56290f.tar.bz2 linux-a8095f7e80fbf3e0efe4ee5cd3f509113c56290f.zip |
nfsd4: size-checking cleanup
Better variable name, some comments, etc.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index a5b666ca560d..3ce431b9b577 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1279,7 +1279,6 @@ nfsd4_proc_compound(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate = &resp->cstate; struct svc_fh *current_fh = &cstate->current_fh; struct svc_fh *save_fh = &cstate->save_fh; - u32 plen = 0; __be32 status; svcxdr_init_encode(rqstp, resp); @@ -1349,9 +1348,13 @@ nfsd4_proc_compound(struct svc_rqst *rqstp, /* If op is non-idempotent */ if (opdesc->op_flags & OP_MODIFIES_SOMETHING) { - plen = opdesc->op_rsize_bop(rqstp, op); /* - * If there's still another operation, make sure + * Don't execute this op if we couldn't encode a + * succesful reply: + */ + u32 plen = opdesc->op_rsize_bop(rqstp, op); + /* + * Plus if there's another operation, make sure * we'll have space to at least encode an error: */ if (resp->opcnt < args->opcnt) |