summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarr <arr@FreeBSD.org>2002-04-25 06:24:40 +0000
committerarr <arr@FreeBSD.org>2002-04-25 06:24:40 +0000
commit99bf18775ecdf71c0a8a2c322e14cd90ba68bd09 (patch)
tree69c460a341f2b2b3653de3341b747de1d258d081
parent04da61f7a875bdb9921a4311db15271f9ac4cf24 (diff)
downloadFreeBSD-src-99bf18775ecdf71c0a8a2c322e14cd90ba68bd09.zip
FreeBSD-src-99bf18775ecdf71c0a8a2c322e14cd90ba68bd09.tar.gz
- Fix a round down bogon in uma_zone_set_max().
Submitted by: jeff@
-rw-r--r--sys/vm/uma_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index bac697a..8418fed 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -1801,6 +1801,8 @@ uma_zone_set_max(uma_zone_t zone, int nitems)
zone->uz_maxpages = nitems * zone->uz_ppera;
else
zone->uz_maxpages = nitems / zone->uz_ipers;
+ if (zone->uz_maxpages * zone->uz_ipers < nitems)
+ zone->uz_maxpages++;
ZONE_UNLOCK(zone);
}
OpenPOWER on IntegriCloud