Whamcloud - gitweb
LU-6142 lustre: all rhashtable_params should be static. 30/39730/2
authorMr NeilBrown <neilb@suse.de>
Tue, 25 Aug 2020 23:17:01 +0000 (09:17 +1000)
committerOleg Drokin <green@whamcloud.com>
Sat, 12 Sep 2020 15:44:44 +0000 (15:44 +0000)
pools_hash_params and nid_hash_params are only used in the file where
they are declared - which is best for rhashtable params.
However they are not declared 'static', and one is even EXPORTed.

Change them both to 'static' and remove the EXPORT.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ib71f8a7c3bfa38fa54b3653d51786a3d8da6117f
Reviewed-on: https://review.whamcloud.com/39730
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lod/lod_pool.c
lustre/obdclass/obd_config.c

index b124a7b..55932d5 100644 (file)
@@ -122,7 +122,7 @@ static int pool_cmpfn(struct rhashtable_compare_arg *arg, const void *obj)
        return strcmp(pool_name, pool->pool_name);
 }
 
-const struct rhashtable_params pools_hash_params = {
+static const struct rhashtable_params pools_hash_params = {
        .key_len        = 1, /* actually variable */
        .key_offset     = offsetof(struct pool_desc, pool_name),
        .head_offset    = offsetof(struct pool_desc, pool_hash),
@@ -130,7 +130,6 @@ const struct rhashtable_params pools_hash_params = {
        .obj_cmpfn      = pool_cmpfn,
        .automatic_shrinking = true,
 };
-EXPORT_SYMBOL(pools_hash_params);
 
 /*
  * Methods for /proc seq_file iteration of the defined pools.
index 882784a..10000ce 100644 (file)
@@ -187,7 +187,7 @@ nid_export_exit(void *vexport, void *data)
        class_export_put(exp);
 }
 
-const struct rhashtable_params nid_hash_params = {
+static const struct rhashtable_params nid_hash_params = {
        .key_len                = sizeof(lnet_nid_t),
        .head_offset            = offsetof(struct obd_export, exp_nid_hash),
        .obj_hashfn             = nid_keyhash,