From 65f09d12b0cd22498f7443609f0fb055edf09c83 Mon Sep 17 00:00:00 2001 From: shaver Date: Sun, 20 Apr 2003 16:55:04 +0000 Subject: [PATCH] Fix build: ldlm_hooks_referenced wasn't defined or set. --- lustre/ptlrpc/ptlrpc_module.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lustre/ptlrpc/ptlrpc_module.c b/lustre/ptlrpc/ptlrpc_module.c index af81745..7478526 100644 --- a/lustre/ptlrpc/ptlrpc_module.c +++ b/lustre/ptlrpc/ptlrpc_module.c @@ -50,20 +50,20 @@ if (!ptlrpc_##name) { \ } \ } +static int ldlm_hooks_referenced; + /* This is called from ptlrpc_get_connection, which runs after all the modules * are loaded, but before anything else interesting happens. */ int ptlrpc_get_ldlm_hooks(void) { - static int ensured = 0; - - if (ensured) + if (ldlm_hooks_referenced) return 1; GET_HOOK(ldlm_namespace_cleanup); GET_HOOK(ldlm_replay_locks); - ensured = 1; + ldlm_hooks_referenced = 1; RETURN(1); } @@ -80,6 +80,7 @@ void ptlrpc_put_ldlm_hooks(void) ENTRY; PUT_HOOK(ldlm_namespace_cleanup); PUT_HOOK(ldlm_replay_locks); + ldlm_hooks_referenced = 0; EXIT; } -- 1.8.3.1