summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2008-08-12 19:43:37 +0200
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-09-29 23:56:58 +0200
commitc47b2ca42e848e2dce122acbefa0de59320f5683 (patch)
tree118ae754894d503371e0907c1f529841811d5bf9 /fs/nfsd
parentnfsd: properly xdr-encode stateid4.seqid as uint32_t for cb_recall (diff)
downloadlinux-c47b2ca42e848e2dce122acbefa0de59320f5683.tar.xz
linux-c47b2ca42e848e2dce122acbefa0de59320f5683.zip
nfsd: properly xdr-encode deleg stateid returned from open
Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4xdr.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 14ba4d9b2859..d7e4bd50ed3c 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -2149,7 +2149,9 @@ nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_op
break;
case NFS4_OPEN_DELEGATE_READ:
RESERVE_SPACE(20 + sizeof(stateid_t));
- WRITEMEM(&open->op_delegate_stateid, sizeof(stateid_t));
+ WRITE32(open->op_delegate_stateid.si_generation);
+ WRITEMEM(&open->op_delegate_stateid.si_opaque,
+ sizeof(stateid_opaque_t));
WRITE32(open->op_recall);
/*
@@ -2163,7 +2165,9 @@ nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_op
break;
case NFS4_OPEN_DELEGATE_WRITE:
RESERVE_SPACE(32 + sizeof(stateid_t));
- WRITEMEM(&open->op_delegate_stateid, sizeof(stateid_t));
+ WRITE32(open->op_delegate_stateid.si_generation);
+ WRITEMEM(&open->op_delegate_stateid.si_opaque,
+ sizeof(stateid_opaque_t));
WRITE32(0);
/*