summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@primarydata.com>2014-06-17 13:44:11 +0200
committerJ. Bruce Fields <bfields@redhat.com>2014-06-23 17:31:37 +0200
commitf419992c1f792f2ce501585853ffc71b8f78caa1 (patch)
treef540cddfc0c379a63729e2d7fac4ded89c609be0 /fs/nfsd/nfs4state.c
parentNFSD: Using exp_get for export getting (diff)
downloadlinux-f419992c1f792f2ce501585853ffc71b8f78caa1.tar.xz
linux-f419992c1f792f2ce501585853ffc71b8f78caa1.zip
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 '')
-rw-r--r--fs/nfsd/nfs4state.c8
1 files changed, 6 insertions, 2 deletions
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)
__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));
}