[lustre-devel] [PATCH 369/622] lnet: Change static defines to use macro for module.c

James Simmons jsimmons at infradead.org
Thu Feb 27 13:13:57 PST 2020


From: Arshad Hussain <arshad.super at gmail.com>

This patch replaces mutex which are defined statically
in file net/lnet/lnet/module.c with kernel provided macro.

WC-bug-id: https://jira.whamcloud.com/browse/LU-9010
Lustre-commit: bb967468875f ("LU-9010 lnet: Change static defines to use macro for module.c")
Signed-off-by: Arshad Hussain <arshad.super at gmail.com>
Reviewed-on: https://review.whamcloud.com/33932
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: Ben Evans <bevans at cray.com>
Reviewed-by: James Simmons <uja.ornl at yahoo.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 net/lnet/lnet/module.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/lnet/lnet/module.c b/net/lnet/lnet/module.c
index 95e1bae..5905f38 100644
--- a/net/lnet/lnet/module.c
+++ b/net/lnet/lnet/module.c
@@ -40,7 +40,7 @@
 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;
 
-	mutex_init(&lnet_config_mutex);
-
 	rc = libcfs_setup();
 	if (rc)
 		return rc;
-- 
1.8.3.1



More information about the lustre-devel mailing list