Whamcloud - gitweb
LU-9010 lnet: Change static defines to use macro for module.c 32/33932/12
authorArshad Hussain <arshad.super@gmail.com>
Thu, 27 Dec 2018 12:26:17 +0000 (07:26 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 25 Jun 2019 01:54:20 +0000 (01:54 +0000)
This patch replaces mutex which are defined statically
in file lnet/lnet/module.c with kernel provided macro.

Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: I59de4514dc332c3c59e0d816720a81394521881c
Reviewed-on: https://review.whamcloud.com/33932
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/module.c

index 676f734..9b43c20 100644 (file)
@@ -39,7 +39,7 @@ static int config_on_load = 0;
 module_param(config_on_load, int, 0444);
 MODULE_PARM_DESC(config_on_load, "configure network at module load");
 
-static struct mutex lnet_config_mutex;
+static DEFINE_MUTEX(lnet_config_mutex);
 
 static int
 lnet_configure(void *arg)
@@ -235,8 +235,6 @@ static int __init lnet_init(void)
        int rc;
        ENTRY;
 
-       mutex_init(&lnet_config_mutex);
-
        rc = lnet_lib_init();
        if (rc != 0) {
                CERROR("lnet_lib_init: error %d\n", rc);