diff options
Diffstat (limited to 'sys/vm/uma_core.c')
-rw-r--r-- | sys/vm/uma_core.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 7556803..4ff177f 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -307,9 +307,8 @@ bucket_init(void) { struct uma_bucket_zone *ubz; int size; - int i; - for (i = 0, ubz = &bucket_zones[0]; ubz->ubz_entries != 0; ubz++) { + for (ubz = &bucket_zones[0]; ubz->ubz_entries != 0; ubz++) { size = roundup(sizeof(struct uma_bucket), sizeof(void *)); size += sizeof(void *) * ubz->ubz_entries; ubz->ubz_zone = uma_zcreate(ubz->ubz_name, size, @@ -3060,7 +3059,7 @@ uma_zone_set_fini(uma_zone_t zone, uma_fini fini) uma_keg_t keg; keg = zone_first_keg(zone); - KASSERT(keg != NULL, ("uma_zone_set_init: Invalid zone type")); + KASSERT(keg != NULL, ("uma_zone_set_fini: Invalid zone type")); KEG_LOCK(keg); KASSERT(keg->uk_pages == 0, ("uma_zone_set_fini on non-empty keg")); @@ -3100,7 +3099,7 @@ uma_zone_set_freef(uma_zone_t zone, uma_free freef) uma_keg_t keg; keg = zone_first_keg(zone); - KASSERT(keg != NULL, ("uma_zone_set_init: Invalid zone type")); + KASSERT(keg != NULL, ("uma_zone_set_freef: Invalid zone type")); KEG_LOCK(keg); keg->uk_freef = freef; KEG_UNLOCK(keg); @@ -3540,16 +3539,13 @@ int sysctl_handle_uma_zone_max(SYSCTL_HANDLER_ARGS) { uma_zone_t zone = *(uma_zone_t *)arg1; - int error, max, old; + int error, max; - old = max = uma_zone_get_max(zone); + max = uma_zone_get_max(zone); error = sysctl_handle_int(oidp, &max, 0, req); if (error || !req->newptr) return (error); - if (max < old) - return (EINVAL); - uma_zone_set_max(zone, max); return (0); |