]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
nfsd: properly xdr-encode deleg stateid returned from open
authorBenny Halevy <bhalevy@panasas.com>
Tue, 12 Aug 2008 17:43:37 +0000 (20:43 +0300)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Mon, 29 Sep 2008 21:56:58 +0000 (17:56 -0400)
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/nfsd/nfs4xdr.c

index 14ba4d9b285913f8aea89eae504908eebc56f435..d7e4bd50ed3c3ddfc2f04e39952ca2418069f82f 100644 (file)
@@ -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);
 
                /*