diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 36a168e383b5a2041b8dddb83d0eff8caa6c8381..426056aff12a3f9f6c958f5a344825e682b57a63 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -614,6 +614,10 @@ static void free_pcppages_bulk(struct zone *zone, int count, list = &pcp->lists[migratetype]; } while (list_empty(list)); + /* This is the only non-empty list. Free them all. */ + if (batch_free == MIGRATE_PCPTYPES) + batch_free = to_free; + do { page = list_entry(list->prev, struct page, lru); /* must delete as __free_one_page list manipulates */