Whamcloud - gitweb
Replace RW_LOCK_UNLOCKED() with rwlock_init() as the former doesn't work with
[fs/lustre-release.git] / lustre / ptlrpc / sec.c
index d053bca..d29a21d 100644 (file)
@@ -66,7 +66,7 @@
  * policy registers                            *
  ***********************************************/
 
-static rwlock_t policy_lock = RW_LOCK_UNLOCKED;
+static rwlock_t policy_lock;
 static struct ptlrpc_sec_policy *policies[SPTLRPC_POLICY_MAX] = {
         NULL,
 };
@@ -2307,6 +2307,8 @@ int __init sptlrpc_init(void)
 {
         int rc;
 
+        rwlock_init(&policy_lock);
+
         rc = sptlrpc_gc_start_thread();
         if (rc)
                 goto out;