mm: pass the vmem_altmap to arch_remove_memory and __remove_pages

We can just pass this on instead of having to do a radix tree lookup
without proper locking 2 levels into the callchain.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
This commit is contained in:
Christoph Hellwig 2017-12-29 08:53:55 +01:00 • committed by Dan Williams
commit da024512a1
10 changed files with 19 additions and 26 deletions

View file

@ -304,7 +304,7 @@ static void devm_memremap_pages_release(struct device *dev, void *data)
align_size = ALIGN(resource_size(res), SECTION_SIZE);
mem_hotplug_begin();
arch_remove_memory(align_start, align_size);
arch_remove_memory(align_start, align_size, pgmap->altmap);
mem_hotplug_done();
untrack_pfn(NULL, PHYS_PFN(align_start), align_size);