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

nfsd: properly xdr-encode deleg stateid returned from open

Signed-off-by: default avatarBenny Halevy <bhalevy@panasas.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent 8e407414
...@@ -2149,7 +2149,9 @@ nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_op ...@@ -2149,7 +2149,9 @@ nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_op
break; break;
case NFS4_OPEN_DELEGATE_READ: case NFS4_OPEN_DELEGATE_READ:
RESERVE_SPACE(20 + sizeof(stateid_t)); 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); WRITE32(open->op_recall);
/* /*
...@@ -2163,7 +2165,9 @@ nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_op ...@@ -2163,7 +2165,9 @@ nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_op
break; break;
case NFS4_OPEN_DELEGATE_WRITE: case NFS4_OPEN_DELEGATE_WRITE:
RESERVE_SPACE(32 + sizeof(stateid_t)); 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); WRITE32(0);
/* /*
......
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