From 711e03b6c0c8dc4261f257fc7d4875e203e4e426 Mon Sep 17 00:00:00 2001 From: Mr NeilBrown Date: Wed, 26 Aug 2020 09:17:01 +1000 Subject: [PATCH] LU-6142 lustre: all rhashtable_params should be static. 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 Change-Id: Ib71f8a7c3bfa38fa54b3653d51786a3d8da6117f Reviewed-on: https://review.whamcloud.com/39730 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Shaun Tancheff Reviewed-by: Oleg Drokin --- lustre/lod/lod_pool.c | 3 +-- lustre/obdclass/obd_config.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lustre/lod/lod_pool.c b/lustre/lod/lod_pool.c index b124a7b..55932d5 100644 --- a/lustre/lod/lod_pool.c +++ b/lustre/lod/lod_pool.c @@ -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. diff --git a/lustre/obdclass/obd_config.c b/lustre/obdclass/obd_config.c index 882784a..10000ce 100644 --- a/lustre/obdclass/obd_config.c +++ b/lustre/obdclass/obd_config.c @@ -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, -- 1.8.3.1