author: Miaohe Lin <linmiaohe@huawei.com> 2021-09-07 19:55:52 -0700
committer: Linus Torvalds <torvalds@linux-foundation.org> 2021-09-08 11:50:23 -0700
commit: 5ef5f810199f421cb6455aa018fb8f21151b4a16
parent: 3fcebf90209a7f52d384ad7701425aa91be309ab
Commit Summary:
Diffstat:
1 file changed, 1 insertion, 3 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index b80fb8164fb8..10030518e3d6 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -477,15 +477,13 @@ void __ref remove_pfn_range_from_zone(struct zone *zone,
sizeof(struct page) * cur_nr_pages);
}
-#ifdef CONFIG_ZONE_DEVICE
/*
* Zone shrinking code cannot properly deal with ZONE_DEVICE. So
* we will not try to shrink the zones - which is okay as
* set_zone_contiguous() cannot deal with ZONE_DEVICE either way.
*/
- if (zone_idx(zone) == ZONE_DEVICE)
+ if (zone_is_zone_device(zone))
return;
-#endif
clear_zone_contiguous(zone);