summaryrefslogtreecommitdiffstats
path: root/sys/vm/uma_core.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2011-05-22 17:46:16 +0000
committeralc <alc@FreeBSD.org>2011-05-22 17:46:16 +0000
commit2c928f61730eb9f4154c757e65e9bd99ba8e48ba (patch)
tree9a5aa410ddb042e5c9749c2b86af9928a171d682 /sys/vm/uma_core.c
parentf098bbfef2f55c1a337f9c31e1831d60dd1545af (diff)
downloadFreeBSD-src-2c928f61730eb9f4154c757e65e9bd99ba8e48ba.zip
FreeBSD-src-2c928f61730eb9f4154c757e65e9bd99ba8e48ba.tar.gz
Correct an error in r222163. Unless UMA_MD_SMALL_ALLOC is defined,
startup_alloc() must be used until uma_startup2() is called. Reported by: jh
Diffstat (limited to 'sys/vm/uma_core.c')
-rw-r--r--sys/vm/uma_core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index f969547..8da5b8e 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -1318,9 +1318,13 @@ keg_ctor(void *mem, int size, void *udata, int flags)
#ifdef UMA_MD_SMALL_ALLOC
keg->uk_allocf = uma_small_alloc;
keg->uk_freef = uma_small_free;
-#endif
+
if (booted < UMA_STARTUP)
keg->uk_allocf = startup_alloc;
+#else
+ if (booted < UMA_STARTUP2)
+ keg->uk_allocf = startup_alloc;
+#endif
} else if (booted < UMA_STARTUP2 &&
(keg->uk_flags & UMA_ZFLAG_INTERNAL))
keg->uk_allocf = startup_alloc;
OpenPOWER on IntegriCloud