From fef267dfd87ef8e42fc67c737f3cbe579e0e1e36 Mon Sep 17 00:00:00 2001 From: adilger Date: Thu, 18 Apr 2002 21:19:57 +0000 Subject: [PATCH] Initialize ldlm_resources at allocation time instead of at ldlm_setup() time, so we don't oops if ldlm_setup has not been called yet. --- lustre/ldlm/ldlm_lockd.c | 1 - lustre/ldlm/ldlm_resource.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index 20456f6..b259286 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -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 = diff --git a/lustre/ldlm/ldlm_resource.c b/lustre/ldlm/ldlm_resource.c index dc8e2c6..b97f546 100644 --- a/lustre/ldlm/ldlm_resource.c +++ b/lustre/ldlm/ldlm_resource.c @@ -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) -- 1.8.3.1