Commit 5033b77a authored by Benny Halevy's avatar Benny Halevy Committed by J. Bruce Fields

nfsd: fix nfsd4_encode_open buffer space reservation

nfsd4_encode_open first reservation is currently for 36 + sizeof(stateid_t)
while it writes after the stateid a cinfo (20 bytes) and 5 more 4-bytes
words, for a total of 40 + sizeof(stateid_t).
Signed-off-by: default avatarBenny Halevy <bhalevy@panasas.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent c47b2ca4
...@@ -2133,7 +2133,7 @@ nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_op ...@@ -2133,7 +2133,7 @@ nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_op
if (nfserr) if (nfserr)
goto out; goto out;
RESERVE_SPACE(36 + sizeof(stateid_t)); RESERVE_SPACE(40 + sizeof(stateid_t));
WRITE32(open->op_stateid.si_generation); WRITE32(open->op_stateid.si_generation);
WRITEMEM(&open->op_stateid.si_opaque, sizeof(stateid_opaque_t)); WRITEMEM(&open->op_stateid.si_opaque, sizeof(stateid_opaque_t));
WRITECINFO(open->op_cinfo); WRITECINFO(open->op_cinfo);
......
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