Skip to content

Commit 39186cb

Browse files
osalvadorvilardagatorvalds
authored andcommitted
mm,memory_hotplug: drop redundant hugepage_migration_supported check
has_unmovable_pages() already checks whether the hugetlb page supports migration, so all non-migratable hugetlb pages should have been caught there. Let us drop the check from scan_movable_pages() as is redundant. Link: http://lkml.kernel.org/r/20190320152658.10855-3-osalvador@suse.de Signed-off-by: Oscar Salvador <osalvador@suse.de> Acked-by: Michal Hocko <mhocko@suse.com> Reviewed-by: David Hildenbrand <david@redhat.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 10eeadf commit 39186cb

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎mm/memory_hotplug.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,8 +1341,7 @@ static unsigned long scan_movable_pages(unsigned long start, unsigned long end)
13411341
if (!PageHuge(page))
13421342
continue;
13431343
head = compound_head(page);
1344-
if (hugepage_migration_supported(page_hstate(head)) &&
1345-
page_huge_active(head))
1344+
if (page_huge_active(head))
13461345
return pfn;
13471346
skip = (1 << compound_order(head)) - (page - head);
13481347
pfn += skip - 1;

0 commit comments

Comments
 (0)