gfs2: constify rhashtable_params
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Wed, 30 Aug 2017 12:50:03 +0000 (07:50 -0500)
committerBob Peterson <rpeterso@redhat.com>
Wed, 30 Aug 2017 13:14:39 +0000 (08:14 -0500)
rhashtable_params are not supposed to change at runtime. All
Functions rhashtable_* working with const rhashtable_params
provided by <linux/rhashtable.h>. So mark the non-const structs
as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
fs/gfs2/glock.c

index 4178417249c3ef9942c07d79a060f357c556e5e6..98e845b7841bda81b4bd9000f4ba027639861d27 100644 (file)
@@ -72,7 +72,7 @@ static DEFINE_SPINLOCK(lru_lock);
 #define GFS2_GL_HASH_SHIFT      15
 #define GFS2_GL_HASH_SIZE       BIT(GFS2_GL_HASH_SHIFT)
 
-static struct rhashtable_params ht_parms = {
+static const struct rhashtable_params ht_parms = {
        .nelem_hint = GFS2_GL_HASH_SIZE * 3 / 4,
        .key_len = offsetofend(struct lm_lockname, ln_type),
        .key_offset = offsetof(struct gfs2_glock, gl_name),