aboutsummaryrefslogtreecommitdiff
path: root/sys/vm
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2002-04-10 01:52:50 +0000
committerJeff Roberson <jeff@FreeBSD.org>2002-04-10 01:52:50 +0000
commitbce9779110e6660d49f5fe8a95418a3f5a11c1ab (patch)
tree433bd2c1b4225df934cb0596140d8d6e87ccd637 /sys/vm
parente228f1da7725e51b5785187f83da970a56082394 (diff)
downloadsrc-bce9779110e6660d49f5fe8a95418a3f5a11c1ab.tar.gz
src-bce9779110e6660d49f5fe8a95418a3f5a11c1ab.zip
Remember to unlock the zone if the fill count is too high.
Pointed out by: pete, jake, jhb
Notes
Notes: svn path=/head/; revision=94329
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/uma_core.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index 6699a09b80ee..ad777b702e27 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -1210,7 +1210,6 @@ uma_startup3(void)
#ifdef UMA_DEBUG
printf("Starting callout.\n");
#endif
- /* We'll be mpsafe once the vm is locked. */
callout_init(&uma_callout, 0);
callout_reset(&uma_callout, UMA_WORKING_TIME * hz, uma_timeout, NULL);
#ifdef UMA_DEBUG
@@ -1422,11 +1421,13 @@ uma_zalloc_internal(uma_zone_t zone, void *udata, int wait, uma_bucket_t bucket)
if (bucket) {
#ifdef SMP
- if (zone->uz_fills >= mp_ncpus)
+ if (zone->uz_fills >= mp_ncpus) {
#else
- if (zone->uz_fills > 1)
+ if (zone->uz_fills > 1) {
#endif
+ ZONE_UNLOCK(zone);
return (NULL);
+ }
zone->uz_fills++;
}