nfsd4: fix change attribute endianness
authorJ. Bruce Fields <bfields@redhat.com>
Wed, 25 Apr 2012 22:11:04 +0000 (18:11 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 1 Jun 2012 00:29:38 +0000 (20:29 -0400)
Though actually this doesn't matter much, as NFSv4.0 clients are
required to treat the change attribute as opaque.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4xdr.c

index f839be1a202cd204096b39b15885182e54670cae..61555e7564108e8271553bc86305faeaee99a7f4 100644 (file)
@@ -1674,12 +1674,12 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
 
 static void write32(__be32 **p, u32 n)
 {
-       *(*p)++ = n;
+       *(*p)++ = htonl(n);
 }
 
 static void write64(__be32 **p, u64 n)
 {
-       write32(p, (u32)(n >> 32));
+       write32(p, (n >> 32));
        write32(p, (u32)n);
 }