diff options
author | Matthew Wilcox (Oracle) | 2021-05-07 07:28:40 -0400 |
---|---|---|
committer | Matthew Wilcox (Oracle) | 2021-10-18 07:49:39 -0400 |
commit | 3417013e0d183be9b42d794082eec0ec1c5b5f15 (patch) | |
tree | cc4dca60d86832d745307f4c000d1ca2702b5334 /mm/folio-compat.c | |
parent | d9c08e2232fbca4fa56b9350f7f84835c4aa3add (diff) |
mm/migrate: Add folio_migrate_mapping()
Reimplement migrate_page_move_mapping() as a wrapper around
folio_migrate_mapping(). Saves 193 bytes of kernel text.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Howells <dhowells@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'mm/folio-compat.c')
-rw-r--r-- | mm/folio-compat.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mm/folio-compat.c b/mm/folio-compat.c index a374747ae1c6..d883d964fd52 100644 --- a/mm/folio-compat.c +++ b/mm/folio-compat.c @@ -4,6 +4,7 @@ * eventually. */ +#include <linux/migrate.h> #include <linux/pagemap.h> #include <linux/swap.h> @@ -48,3 +49,13 @@ void mark_page_accessed(struct page *page) folio_mark_accessed(page_folio(page)); } EXPORT_SYMBOL(mark_page_accessed); + +#ifdef CONFIG_MIGRATION +int migrate_page_move_mapping(struct address_space *mapping, + struct page *newpage, struct page *page, int extra_count) +{ + return folio_migrate_mapping(mapping, page_folio(newpage), + page_folio(page), extra_count); +} +EXPORT_SYMBOL(migrate_page_move_mapping); +#endif |