diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index f3f048724ac7151d4d89d76a2b44b940b2e0f1d4..a6be9d3ee1f08b4cbd37eeb31b11d73de6047828 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -581,8 +581,12 @@ static void gen_boot_verifier(nfs4_verifier *verifier, struct net *net) __be32 verf[2]; struct nfsd_net *nn = net_generic(net, nfsd_net_id); - verf[0] = (__be32)nn->nfssvc_boot.tv_sec; - verf[1] = (__be32)nn->nfssvc_boot.tv_usec; + /* + * This is opaque to client, so no need to byte-swap. Use + * __force to keep sparse happy + */ + verf[0] = (__force __be32)nn->nfssvc_boot.tv_sec; + verf[1] = (__force __be32)nn->nfssvc_boot.tv_usec; memcpy(verifier->data, verf, sizeof(verifier->data)); } diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 2204e1fe5725b725cef3603aaca3618824066241..8242385a249ca2f5e1e1d0dc72c2a6735142cc04 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -1421,8 +1421,12 @@ static void gen_confirm(struct nfs4_client *clp) __be32 verf[2]; static u32 i; - verf[0] = (__be32)get_seconds(); - verf[1] = (__be32)i++; + /* + * This is opaque to client, so no need to byte-swap. Use + * __force to keep sparse happy + */ + verf[0] = (__force __be32)get_seconds(); + verf[1] = (__force __be32)i++; memcpy(clp->cl_confirm.data, verf, sizeof(clp->cl_confirm.data)); }