diff --git a/mm/page_alloc.c b/mm/page_alloc.c index e2f26991fff136ed40438f3b07cdaffec78aa90a..8add7daf98b0ace1c5e9f35041cef57362d15d55 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2706,7 +2706,7 @@ static int zone_batchsize(struct zone *zone) * of pages of one half of the possible page colors * and the other with pages of the other colors. */ - batch = (1 << (fls(batch + batch/2)-1)) - 1; + batch = rounddown_pow_of_two(batch + batch/2) - 1; return batch; }