diff options
Diffstat (limited to '')
-rw-r--r-- | mm/migrate.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index c93dd6a31..c5968021f 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -423,8 +423,12 @@ int folio_migrate_mapping(struct address_space *mapping, if (folio_test_swapbacked(folio)) { __folio_set_swapbacked(newfolio); if (folio_test_swapcache(folio)) { + int i; + folio_set_swapcache(newfolio); - newfolio->private = folio_get_private(folio); + for (i = 0; i < nr; i++) + set_page_private(folio_page(newfolio, i), + page_private(folio_page(folio, i))); } entries = nr; } else { |