From: Chuck Lever Date: Tue, 22 May 2012 02:45:16 +0000 (-0400) Subject: NFS: Don't swap bytes in nfs4_construct_boot_verifier() X-Git-Tag: firefly_0821_release~3680^2~2730^2~39 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c3607282b4d8787a530eb4a9a452b4e823508b9f;p=firefly-linux-kernel-4.4.55.git NFS: Don't swap bytes in nfs4_construct_boot_verifier() 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 Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 78784e5ca4c1..0f4e54033abf 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -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)); }