diff options
| author | Alan Cox <alc@FreeBSD.org> | 2003-11-14 17:49:07 +0000 |
|---|---|---|
| committer | Alan Cox <alc@FreeBSD.org> | 2003-11-14 17:49:07 +0000 |
| commit | d1f42ac2eeb2bdff11ace5368508187e70c69ced (patch) | |
| tree | 9afd0394db70185577b2dc9726ff826c971202c6 | |
| parent | 258a21fe7a540e1cf2ecd3fdac24197fc51dafc7 (diff) | |
Notes
| -rw-r--r-- | sys/vm/uma_core.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index a821bd2c1489..9b745f1f48ff 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -1957,8 +1957,6 @@ uma_zone_set_obj(uma_zone_t zone, struct vm_object *obj, int count) int pages; vm_offset_t kva; - mtx_lock(&Giant); - pages = count / zone->uz_ipers; if (pages * zone->uz_ipers < count) @@ -1966,10 +1964,8 @@ uma_zone_set_obj(uma_zone_t zone, struct vm_object *obj, int count) kva = kmem_alloc_pageable(kernel_map, pages * UMA_SLAB_SIZE); - if (kva == 0) { - mtx_unlock(&Giant); + if (kva == 0) return (0); - } if (obj == NULL) { obj = vm_object_allocate(OBJT_DEFAULT, pages); @@ -1985,8 +1981,6 @@ uma_zone_set_obj(uma_zone_t zone, struct vm_object *obj, int count) zone->uz_allocf = obj_alloc; zone->uz_flags |= UMA_ZONE_NOFREE | UMA_ZFLAG_PRIVALLOC; ZONE_UNLOCK(zone); - mtx_unlock(&Giant); - return (1); } |
