Whamcloud - gitweb
LU-5579 tests: Add test for resend enqueue vs lock destroy
[fs/lustre-release.git] / lustre / ptlrpc / sec_gc.c
index af3ee85..1b60971 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2014, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -47,6 +47,8 @@
 #include <lustre_net.h>
 #include <lustre_sec.h>
 
+#include "ptlrpc_internal.h"
+
 #define SEC_GC_INTERVAL (30 * 60)
 
 
@@ -75,7 +77,6 @@ void sptlrpc_gc_add_sec(struct ptlrpc_sec *sec)
 
        CDEBUG(D_SEC, "added sec %p(%s)\n", sec, sec->ps_policy->sp_name);
 }
-EXPORT_SYMBOL(sptlrpc_gc_add_sec);
 
 void sptlrpc_gc_del_sec(struct ptlrpc_sec *sec)
 {
@@ -99,7 +100,6 @@ void sptlrpc_gc_del_sec(struct ptlrpc_sec *sec)
 
        CDEBUG(D_SEC, "del sec %p(%s)\n", sec, sec->ps_policy->sp_name);
 }
-EXPORT_SYMBOL(sptlrpc_gc_del_sec);
 
 void sptlrpc_gc_add_ctx(struct ptlrpc_cli_ctx *ctx)
 {
@@ -199,7 +199,9 @@ again:
                /* check ctx list again before sleep */
                sec_process_ctx_list();
 
-               lwi = LWI_TIMEOUT(SEC_GC_INTERVAL * HZ, NULL, NULL);
+               lwi = LWI_TIMEOUT(msecs_to_jiffies(SEC_GC_INTERVAL *
+                                                  MSEC_PER_SEC),
+                                 NULL, NULL);
                l_wait_event(thread->t_ctl_waitq,
                             thread_is_stopping(thread) ||
                             thread_is_signal(thread),
@@ -251,4 +253,3 @@ void sptlrpc_gc_fini(void)
        l_wait_event(sec_gc_thread.t_ctl_waitq,
                     thread_is_stopped(&sec_gc_thread), &lwi);
 }
-