diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-05-07 22:26:29 +0300 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-10-18 14:49:39 +0300 |
commit | 19138349ed59b90ce58aca319b873eca2e04ad43 (patch) | |
tree | b55487b03b82b5fb9e5837c4698ccfd17eda5857 /include/linux/migrate.h | |
parent | 3417013e0d183be9b42d794082eec0ec1c5b5f15 (diff) | |
download | linux-19138349ed59b90ce58aca319b873eca2e04ad43.tar.xz |
mm/migrate: Add folio_migrate_flags()
Turn migrate_page_states() into a wrapper around folio_migrate_flags().
Also convert two functions only called from folio_migrate_flags() to
be folio-based. ksm_migrate_page() becomes folio_migrate_ksm() and
copy_page_owner() becomes folio_copy_owner(). folio_migrate_flags()
alone shrinks by two thirds -- 1967 bytes down to 642 bytes.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: David Howells <dhowells@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'include/linux/migrate.h')
-rw-r--r-- | include/linux/migrate.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index 58b3af645e20..aa875b83f7ba 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h @@ -57,6 +57,7 @@ extern int migrate_huge_page_move_mapping(struct address_space *mapping, struct page *newpage, struct page *page); extern int migrate_page_move_mapping(struct address_space *mapping, struct page *newpage, struct page *page, int extra_count); +void folio_migrate_flags(struct folio *newfolio, struct folio *folio); int folio_migrate_mapping(struct address_space *mapping, struct folio *newfolio, struct folio *folio, int extra_count); #else |