From c7173f58fa9cbe950438df6c736f12ca73bfc532 Mon Sep 17 00:00:00 2001 From: Jeff Roberson Date: Sat, 4 May 2002 21:49:29 +0000 Subject: [PATCH] Use pages instead of uz_maxpages, which has not been initialized yet, when creating the vm_object. This was broken after the code was rearranged to grab giant itself. Spotted by: alc --- sys/vm/uma_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 39aca9e1fd6..7532e73b308 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -1873,10 +1873,10 @@ uma_zone_set_obj(uma_zone_t zone, struct vm_object *obj, int count) if (obj == NULL) obj = vm_object_allocate(OBJT_DEFAULT, - zone->uz_maxpages); + pages); else _vm_object_allocate(OBJT_DEFAULT, - zone->uz_maxpages, obj); + pages, obj); ZONE_LOCK(zone); zone->uz_kva = kva;