summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2008-08-12 20:43:37 +0300
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-09-29 17:56:58 -0400
commitc47b2ca42e848e2dce122acbefa0de59320f5683 (patch)
tree118ae754894d503371e0907c1f529841811d5bf9 /fs
parent8e40741494bd08a15af17b8cfd26a1f7ad1f5081 (diff)
downloadop-kernel-dev-c47b2ca42e848e2dce122acbefa0de59320f5683.zip
op-kernel-dev-c47b2ca42e848e2dce122acbefa0de59320f5683.tar.gz
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')
-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 14ba4d9..d7e4bd5 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);
/*
OpenPOWER on IntegriCloud