Skip to content

Commit 96da435

Browse files
djbwtorvalds
authored andcommitted
mm/hotplug: kill is_dev_zone() usage in __remove_pages()
The zone type check was a leftover from the cleanup that plumbed altmap through the memory hotplug path, i.e. commit da02451 "mm: pass the vmem_altmap to arch_remove_memory and __remove_pages". Link: http://lkml.kernel.org/r/156092352642.979959.6664333788149363039.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Reviewed-by: Oscar Salvador <[email protected]> Tested-by: Aneesh Kumar K.V <[email protected]> [ppc64] Cc: Michal Hocko <[email protected]> Cc: Logan Gunthorpe <[email protected]> Cc: Pavel Tatashin <[email protected]> Cc: Jane Chu <[email protected]> Cc: Jeff Moyer <[email protected]> Cc: Jérôme Glisse <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Mike Rapoport <[email protected]> Cc: Toshi Kani <[email protected]> Cc: Vlastimil Babka <[email protected]> Cc: Wei Yang <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent e9c0a3f commit 96da435

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

mm/memory_hotplug.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,9 +535,7 @@ void __remove_pages(struct zone *zone, unsigned long phys_start_pfn,
535535
unsigned long map_offset = 0;
536536
int sections_to_remove;
537537

538-
/* In the ZONE_DEVICE case device driver owns the memory region */
539-
if (is_dev_zone(zone))
540-
map_offset = vmem_altmap_offset(altmap);
538+
map_offset = vmem_altmap_offset(altmap);
541539

542540
clear_zone_contiguous(zone);
543541

0 commit comments

Comments
 (0)