aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4proc.c8
-rw-r--r--fs/nfsd/nfs4state.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index f3f048724ac7..a6be9d3ee1f0 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)
581 __be32 verf[2]; 581 __be32 verf[2];
582 struct nfsd_net *nn = net_generic(net, nfsd_net_id); 582 struct nfsd_net *nn = net_generic(net, nfsd_net_id);
583 583
584 verf[0] = (__be32)nn->nfssvc_boot.tv_sec; 584 /*
585 verf[1] = (__be32)nn->nfssvc_boot.tv_usec; 585 * This is opaque to client, so no need to byte-swap. Use
586 * __force to keep sparse happy
587 */
588 verf[0] = (__force __be32)nn->nfssvc_boot.tv_sec;
589 verf[1] = (__force __be32)nn->nfssvc_boot.tv_usec;
586 memcpy(verifier->data, verf, sizeof(verifier->data)); 590 memcpy(verifier->data, verf, sizeof(verifier->data));
587} 591}
588 592
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 2204e1fe5725..8242385a249c 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1421,8 +1421,12 @@ static void gen_confirm(struct nfs4_client *clp)
1421 __be32 verf[2]; 1421 __be32 verf[2];
1422 static u32 i; 1422 static u32 i;
1423 1423
1424 verf[0] = (__be32)get_seconds(); 1424 /*
1425 verf[1] = (__be32)i++; 1425 * This is opaque to client, so no need to byte-swap. Use
1426 * __force to keep sparse happy
1427 */
1428 verf[0] = (__force __be32)get_seconds();
1429 verf[1] = (__force __be32)i++;
1426 memcpy(clp->cl_confirm.data, verf, sizeof(clp->cl_confirm.data)); 1430 memcpy(clp->cl_confirm.data, verf, sizeof(clp->cl_confirm.data));
1427} 1431}
1428 1432