Whamcloud - gitweb
Initialize ldlm_resources at allocation time instead of at ldlm_setup()
authoradilger <adilger>
Thu, 18 Apr 2002 21:19:57 +0000 (21:19 +0000)
committeradilger <adilger>
Thu, 18 Apr 2002 21:19:57 +0000 (21:19 +0000)
time, so we don't oops if ldlm_setup has not been called yet.

lustre/ldlm/ldlm_lockd.c
lustre/ldlm/ldlm_resource.c

index 20456f6..b259286 100644 (file)
@@ -275,7 +275,6 @@ static int ldlm_setup(struct obd_device *obddev, obd_count len, void *data)
         int err;
         ENTRY;
 
-        INIT_LIST_HEAD(&ldlm_namespaces);
         ldlm_spinlock = SPIN_LOCK_UNLOCKED;
 
         ldlm->ldlm_service =
index dc8e2c6..b97f546 100644 (file)
@@ -17,7 +17,7 @@
 
 kmem_cache_t *ldlm_resource_slab, *ldlm_lock_slab;
 
-struct list_head ldlm_namespaces;
+LIST_HEAD(ldlm_namespaces);
 spinlock_t ldlm_spinlock;
 
 struct ldlm_namespace *ldlm_namespace_find(__u32 id)