aboutsummaryrefslogtreecommitdiff
path: root/sys/vm
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2002-04-08 05:13:48 +0000
committerJeff Roberson <jeff@FreeBSD.org>2002-04-08 05:13:48 +0000
commit605cbd6a083a1325a76771aefda1d57c4b4f6533 (patch)
treed5b8a7ddc059a18708e0785efcdd55be903ee568 /sys/vm
parentc0bf5caa746208fe5ac323e8d26dce6e65c3cdce (diff)
downloadsrc-605cbd6a083a1325a76771aefda1d57c4b4f6533.tar.gz
src-605cbd6a083a1325a76771aefda1d57c4b4f6533.zip
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
Notes
Notes: svn path=/head/; revision=94163
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/uma_core.c6
1 files changed, 3 insertions, 3 deletions
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 */