[PATCH 3/7] nfsd: fix nfsd4_encode_open buffer space reservation

Benny Halevy
2008-08-12T17:44:58Z

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: Benny Halevy <bhalevy@panasas.com>
---
fs/nfsd/nfs4xdr.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index cfe9d5c..4ec52f9 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -2142,7 +2142,7 @@ nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_op
if (nfserr)
goto out;

- RESERVE_SPACE(36 + sizeof(stateid_t));
+ RESERVE_SPACE(40 + sizeof(stateid_t));
WRITE32(open->op_stateid.si_generation);
WRITEMEM(&open->op_stateid.si_opaque, sizeof(stateid_opaque_t));
WRITECINFO(open->op_cinfo);
--
1.5.6.5