浏览代码

nfsd4: fix change attribute endianness

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>
J. Bruce Fields 13 年之前
父节点
当前提交
45eaa1c1a1
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      fs/nfsd/nfs4xdr.c

+ 2 - 2
fs/nfsd/nfs4xdr.c

@@ -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);
 }