diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-05-06 18:14:59 -0400 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-09-27 09:27:31 -0400 |
commit | d21bba2b7d0ae19dd1279e10aee61c37a17aba74 (patch) | |
tree | 279421ef48dee2857e5aa5353edbd0c39c60894c /mm/migrate.c | |
parent | bbc6b703b21963e909f633cf7718903ed5094319 (diff) | |
download | linux-d21bba2b7d0ae19dd1279e10aee61c37a17aba74.tar.gz linux-d21bba2b7d0ae19dd1279e10aee61c37a17aba74.tar.bz2 linux-d21bba2b7d0ae19dd1279e10aee61c37a17aba74.zip |
mm/memcg: Convert mem_cgroup_migrate() to take folios
Convert all callers of mem_cgroup_migrate() to call page_folio() first.
They all look like they're using head pages already, but this proves it.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Mike Rapoport <rppt@linux.ibm.com>
Reviewed-by: David Howells <dhowells@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'mm/migrate.c')
-rw-r--r-- | mm/migrate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index da55d2a8638d..bfb8ba490479 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -542,6 +542,8 @@ int migrate_huge_page_move_mapping(struct address_space *mapping, */ void migrate_page_states(struct page *newpage, struct page *page) { + struct folio *folio = page_folio(page); + struct folio *newfolio = page_folio(newpage); int cpupid; if (PageError(page)) @@ -609,7 +611,7 @@ void migrate_page_states(struct page *newpage, struct page *page) copy_page_owner(page, newpage); if (!PageHuge(page)) - mem_cgroup_migrate(page, newpage); + mem_cgroup_migrate(folio, newfolio); } EXPORT_SYMBOL(migrate_page_states); |