From 605cbd6a083a1325a76771aefda1d57c4b4f6533 Mon Sep 17 00:00:00 2001 From: Jeff Roberson Date: Mon, 8 Apr 2002 05:13:48 +0000 Subject: Don't release the zone lock until after the dtor has been called. As far as I can tell this could not have caused any problems yet because UMA is still called with giant. Pointy hat to: jeff Noticed by: jake --- sys/vm/uma_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/vm') diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 26ba0dbcde54..1bac1a3b1f2c 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -1546,9 +1546,9 @@ zfree_start: KASSERT(bucket->ub_bucket[bucket->ub_ptr] == NULL, ("uma_zfree: Freeing to non free bucket index.")); bucket->ub_bucket[bucket->ub_ptr] = item; - CPU_UNLOCK(zone, cpu); if (zone->uz_dtor) zone->uz_dtor(item, zone->uz_size, udata); + CPU_UNLOCK(zone, cpu); return; } else if (cache->uc_allocbucket) { #ifdef UMA_DEBUG_ALLOC @@ -1699,10 +1699,10 @@ uma_zfree_internal(uma_zone_t zone, void *item, void *udata, int skip) /* Zone statistics */ zone->uz_free++; - ZONE_UNLOCK(zone); - if (!skip && zone->uz_dtor) zone->uz_dtor(item, zone->uz_size, udata); + + ZONE_UNLOCK(zone); } /* See uma.h */ -- cgit v1.2.3