Whamcloud - gitweb
LU-10391 lnet: remove 'accept' variable.
[fs/lustre-release.git] / lnet / lnet / acceptor.c
index 5de4d44..75e9f27 100644 (file)
@@ -71,9 +71,9 @@ lnet_accept_magic(__u32 magic, __u32 constant)
 
 EXPORT_SYMBOL(lnet_acceptor_port);
 
-static char *accept = "secure";
+static char *accept_type = "secure";
 
-module_param(accept, charp, 0444);
+module_param_named(accept, accept_type, charp, 0444);
 MODULE_PARM_DESC(accept, "Accept connections (secure|all|none)");
 module_param(accept_port, int, 0444);
 MODULE_PARM_DESC(accept_port, "Acceptor's port (same on all nodes)");
@@ -82,18 +82,6 @@ MODULE_PARM_DESC(accept_backlog, "Acceptor's listen backlog");
 module_param(accept_timeout, int, 0644);
 MODULE_PARM_DESC(accept_timeout, "Acceptor's timeout (seconds)");
 
-static char *accept_type = NULL;
-
-static int
-lnet_acceptor_get_tunables(void)
-{
-       /* Userland acceptor uses 'accept_type' instead of 'accept', due to
-        * conflict with 'accept(2)', but kernel acceptor still uses 'accept'
-        * for compatibility. Hence the trick. */
-       accept_type = accept;
-       return 0;
-}
-
 int
 lnet_acceptor_timeout(void)
 {
@@ -500,10 +488,6 @@ lnet_acceptor_start(void)
 
        LASSERT(lnet_acceptor_state.pta_sock == NULL);
 
-       rc = lnet_acceptor_get_tunables();
-       if (rc != 0)
-               return rc;
-
        init_completion(&lnet_acceptor_state.pta_signal);
        rc = accept2secure(accept_type, &secure);
        if (rc <= 0)