Whamcloud - gitweb
b=1111
authorpschwan <pschwan>
Sat, 12 Apr 2003 17:42:08 +0000 (17:42 +0000)
committerpschwan <pschwan>
Sat, 12 Apr 2003 17:42:08 +0000 (17:42 +0000)
- Pass 'force' down to all of the cleanup methods, instead of just
  having special meaning for exports
- in ldlm_cleanup, if forcing, remove the ldlm hooks from ptlrpc so we
  can unload the ldlm module

lustre/ptlrpc/ptlrpc_internal.h
lustre/ptlrpc/ptlrpc_module.c

index 646c09e..0290d62 100644 (file)
@@ -36,7 +36,6 @@ extern int (*ptlrpc_ldlm_cli_cancel_unused)(struct ldlm_namespace *,
 extern int (*ptlrpc_ldlm_replay_locks)(struct obd_import *);
 
 int ptlrpc_get_ldlm_hooks(void);
-void ptlrpc_put_ldlm_hooks(void);
 void ptlrpc_daemonize(void);
 
 int ptlrpc_import_handle_eviction(struct obd_import *);
index f8e488c..bd35800 100644 (file)
@@ -40,8 +40,6 @@ extern int ptlrpc_init_portals(void);
 extern void ptlrpc_exit_portals(void);
 
 int (*ptlrpc_ldlm_namespace_cleanup)(struct ldlm_namespace *, int);
-int (*ptlrpc_ldlm_cli_cancel_unused)(struct ldlm_namespace *,
-                                     struct ldlm_res_id *, int);
 int (*ptlrpc_ldlm_replay_locks)(struct obd_import *);
 
 #define GET_HOOK(name)                                                         \
@@ -62,7 +60,6 @@ int ptlrpc_get_ldlm_hooks(void)
         if (ensured)
                 return 1;
 
-        GET_HOOK(ldlm_cli_cancel_unused);
         GET_HOOK(ldlm_namespace_cleanup);
         GET_HOOK(ldlm_replay_locks);
 
@@ -81,10 +78,9 @@ if (ptlrpc_##hook) {                                                           \
 void ptlrpc_put_ldlm_hooks(void)
 {
         ENTRY;
-
-        PUT_HOOK(ldlm_cli_cancel_unused);
         PUT_HOOK(ldlm_namespace_cleanup);
         PUT_HOOK(ldlm_replay_locks);
+        EXIT;
 }
 
 #undef PUT_HOOK
@@ -206,6 +202,9 @@ EXPORT_SYMBOL(lustre_swab_ptlbd_op);
 EXPORT_SYMBOL(lustre_swab_ptlbd_niob);
 EXPORT_SYMBOL(lustre_swab_ptlbd_rsp);
 
+/* ptlrpc_module.c */
+EXPORT_SYMBOL(ptlrpc_put_ldlm_hooks);
+
 /* recover.c */
 EXPORT_SYMBOL(ptlrpc_run_recovery_upcall);
 EXPORT_SYMBOL(ptlrpc_reconnect_import);