aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index e5b8f628d166..db8c46ffa9f5 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4471,8 +4471,9 @@ static void setup_per_zone_inactive_ratio(void)
4471 4471
4472 /* Zone size in gigabytes */ 4472 /* Zone size in gigabytes */
4473 gb = zone->present_pages >> (30 - PAGE_SHIFT); 4473 gb = zone->present_pages >> (30 - PAGE_SHIFT);
4474 ratio = int_sqrt(10 * gb); 4474 if (gb)
4475 if (!ratio) 4475 ratio = int_sqrt(10 * gb);
4476 else
4476 ratio = 1; 4477 ratio = 1;
4477 4478
4478 zone->inactive_ratio = ratio; 4479 zone->inactive_ratio = ratio;