aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4proc.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@primarydata.com>2014-06-17 07:44:11 -0400
committerJ. Bruce Fields <bfields@redhat.com>2014-06-23 11:31:37 -0400
commitf419992c1f792f2ce501585853ffc71b8f78caa1 (patch)
treef540cddfc0c379a63729e2d7fac4ded89c609be0 /fs/nfsd/nfs4proc.c
parentbf18f163e89c52e09c96534db45c4274273a0b34 (diff)
nfsd: add __force to opaque verifier field casts
sparse complains that we're stuffing non-byte-swapped values into __be32's here. Since they're supposed to be opaque, it doesn't matter much. Just add __force to make sparse happy. Signed-off-by: Jeff Layton <jlayton@primarydata.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r--fs/nfsd/nfs4proc.c8
1 files changed, 6 insertions, 2 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