From b85c8cf61ebcec24f214f45f2c2702a4c56b3cbe Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 2 Aug 2005 19:46:23 +0000 Subject: [PATCH 1/1] b=3984 - a reference on resource must be taked under spinlock --- lustre/ldlm/ldlm_resource.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lustre/ldlm/ldlm_resource.c b/lustre/ldlm/ldlm_resource.c index 425cdc5..3633d87 100644 --- a/lustre/ldlm/ldlm_resource.c +++ b/lustre/ldlm/ldlm_resource.c @@ -365,15 +365,14 @@ int ldlm_namespace_cleanup(struct ldlm_namespace *ns, int flags) return ELDLM_OK; } - /* FIXME: protect by ns_hash_lock -bzzz */ for (i = 0; i < RES_HASH_SIZE; i++) { spin_lock(&ns->ns_hash_lock); tmp = ns->ns_hash[i].next; while (tmp != &(ns->ns_hash[i])) { struct ldlm_resource *res; res = list_entry(tmp, struct ldlm_resource, lr_hash); - spin_unlock(&ns->ns_hash_lock); ldlm_resource_getref(res); + spin_unlock(&ns->ns_hash_lock); cleanup_resource(res, &res->lr_granted, flags); cleanup_resource(res, &res->lr_converting, flags); -- 1.8.3.1