Skip to content

Commit a5ea521

Browse files
Hugh Dickinsakpm00
authored andcommitted
mm: simplify folio_migrate_mapping()
Now that folio_undo_large_rmappable() is an inline function checking order and large_rmappable for itself (and __folio_undo_large_rmappable() is now declared even when CONFIG_TRANASPARENT_HUGEPAGE is off) there is no need for folio_migrate_mapping() to check large and large_rmappable first (in the mapping case when it has had to freeze anyway). Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Hugh Dickins <[email protected]> Reviewed-by: Zi Yan <[email protected]> Cc: Baolin Wang <[email protected]> Cc: Barry Song <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Kefeng Wang <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Nhat Pham <[email protected]> Cc: Yang Shi <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent f6953e2 commit a5ea521

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mm/migrate.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,7 @@ static int __folio_migrate_mapping(struct address_space *mapping,
438438
}
439439

440440
/* Take off deferred split queue while frozen and memcg set */
441-
if (folio_test_large(folio) && folio_test_large_rmappable(folio))
442-
folio_undo_large_rmappable(folio);
441+
folio_undo_large_rmappable(folio);
443442

444443
/*
445444
* Now we know that no one else is looking at the folio:

0 commit comments

Comments
 (0)