Whamcloud - gitweb
- remove unused ptlrpc_uuid2conn
authorshaver <shaver>
Mon, 24 Mar 2003 20:49:14 +0000 (20:49 +0000)
committershaver <shaver>
Mon, 24 Mar 2003 20:49:14 +0000 (20:49 +0000)
- lose extra dlm-hook-put CERROR
- don't need to cleanup DLM ns or schedule when forcing disconnect: it's already
  cleaned up, or we don't get unmounted
- export and import extra-put assertion checking
- fix connection switching to work when we don't already have a connection created

lustre/ptlrpc/ptlrpc_module.c

index 12a2085..df5ab06 100644 (file)
@@ -72,16 +72,23 @@ int ptlrpc_get_ldlm_hooks(void)
 
 #undef GET_HOOK
 
+#define PUT_HOOK(hook)                                                         \
+if (ptlrpc_##hook) {                                                           \
+        inter_module_put(#hook);                                               \
+        ptlrpc_##hook = NULL;                                                  \
+}
+
 void ptlrpc_put_ldlm_hooks(void)
 {
-        if (ptlrpc_ldlm_cli_cancel_unused)
-                inter_module_put("ldlm_cli_cancel_unused");
-        if (ptlrpc_ldlm_namespace_cleanup)
-                inter_module_put("ldlm_namespace_cleanup");
-        if (ptlrpc_ldlm_replay_locks)
-                inter_module_put("ldlm_replay_locks");
+        ENTRY;
+
+        PUT_HOOK(ldlm_cli_cancel_unused);
+        PUT_HOOK(ldlm_namespace_cleanup);
+        PUT_HOOK(ldlm_replay_locks);
 }
 
+#undef PUT_HOOK
+
 __init int ptlrpc_init(void)
 {
         int rc;
@@ -106,7 +113,6 @@ static void __exit ptlrpc_exit(void)
 
 /* connection.c */
 EXPORT_SYMBOL(ptlrpc_readdress_connection);
-EXPORT_SYMBOL(ptlrpc_uuid2conn);
 EXPORT_SYMBOL(ptlrpc_get_connection);
 EXPORT_SYMBOL(ptlrpc_put_connection);
 EXPORT_SYMBOL(ptlrpc_connection_addref);