From: Dev Jain Date: Fri, 18 Oct 2024 09:41:51 +0000 (+0530) Subject: mm: remove redundant condition for THP folio X-Git-Tag: v6.13-rc1~99^2~117 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5bb6345cd2edfceef1749950ce786f205e56a90b;p=thirdparty%2Flinux.git mm: remove redundant condition for THP folio folio_test_pmd_mappable() implies folio_test_large(), therefore, simplify the expression for is_thp. Link: https://lkml.kernel.org/r/20241018094151.3458-1-dev.jain@arm.com Signed-off-by: Dev Jain Reviewed-by: Matthew Wilcox (Oracle) Acked-by: David Hildenbrand Reviewed-by: Zi Yan Reviewed-by: Anshuman Khandual Cc: "Huang, Ying" Signed-off-by: Andrew Morton --- diff --git a/mm/migrate.c b/mm/migrate.c index 72c6657f4f72c..dfb5eba3c5223 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1733,7 +1733,7 @@ static int migrate_pages_batch(struct list_head *from, list_for_each_entry_safe(folio, folio2, from, lru) { is_large = folio_test_large(folio); - is_thp = is_large && folio_test_pmd_mappable(folio); + is_thp = folio_test_pmd_mappable(folio); nr_pages = folio_nr_pages(folio); cond_resched();