NFS: Don't swap bytes in nfs4_construct_boot_verifier()
authorChuck Lever <chuck.lever@oracle.com>
Tue, 22 May 2012 02:45:16 +0000 (22:45 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 22 May 2012 20:45:42 +0000 (16:45 -0400)
The SETCLIENTID boot verifier is opaque to NFSv4 servers, thus there
is no requirement for byte swapping before the client puts the
verifier on the wire.

This treatment is similar to other timestamp-based verifiers.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4proc.c

index 78784e5..0f4e540 100644 (file)
@@ -3908,8 +3908,8 @@ static void nfs4_construct_boot_verifier(struct nfs_client *clp,
 {
        __be32 verf[2];
 
-       verf[0] = htonl((u32)clp->cl_boot_time.tv_sec);
-       verf[1] = htonl((u32)clp->cl_boot_time.tv_nsec);
+       verf[0] = (__be32)clp->cl_boot_time.tv_sec;
+       verf[1] = (__be32)clp->cl_boot_time.tv_nsec;
        memcpy(bootverf->data, verf, sizeof(bootverf->data));
 }