summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mm/page_alloc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index c60605df9b48..4aed338fc535 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5666,6 +5666,7 @@ static void __init find_zone_movable_pfns_for_nodes(void)
*/
required_movablecore =
roundup(required_movablecore, MAX_ORDER_NR_PAGES);
+ required_movablecore = min(totalpages, required_movablecore);
corepages = totalpages - required_movablecore;
required_kernelcore = max(required_kernelcore, corepages);