Message ID | 20210605030124.YGvVrHxno%akpm@linux-foundation.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/13] Revert "MIPS: make userspace mapping young by default" | expand |
--- a/drivers/base/memory.c~drivers-base-memory-fix-trying-offlining-memory-blocks-with-memory-holes-on-aarch64 +++ a/drivers/base/memory.c @@ -218,14 +218,14 @@ static int memory_block_offline(struct m struct zone *zone; int ret; - zone = page_zone(pfn_to_page(start_pfn)); - /* * Unaccount before offlining, such that unpopulated zone and kthreads * can properly be torn down in offline_pages(). */ - if (nr_vmemmap_pages) + if (nr_vmemmap_pages) { + zone = page_zone(pfn_to_page(start_pfn)); adjust_present_page_count(zone, -nr_vmemmap_pages); + } ret = offline_pages(start_pfn + nr_vmemmap_pages, nr_pages - nr_vmemmap_pages);