diff --git a/android/ACK_SHA b/android/ACK_SHA index 483da20088e0..dbf8494c3acc 100644 --- a/android/ACK_SHA +++ b/android/ACK_SHA @@ -1,2 +1,2 @@ -a2fa77d36d26b574cffec6766df50a711f305450 -android14-6.1-2023-11_r3 +6dd1f54e29ea4c4ec0c508ab8a7b78991e2ca25b +android14-6.1-2023-12_r2 diff --git a/mm/migrate.c b/mm/migrate.c index ef490976c98e..9f5f52deed0c 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -393,6 +393,7 @@ int folio_migrate_mapping(struct address_space *mapping, int dirty; int expected_count = folio_expected_refs(mapping, folio) + extra_count; long nr = folio_nr_pages(folio); + long entries, i; if (!mapping) { /* Anonymous page without mapping */ @@ -430,8 +431,10 @@ int folio_migrate_mapping(struct address_space *mapping, folio_set_swapcache(newfolio); newfolio->private = folio_get_private(folio); } + entries = nr; } else { VM_BUG_ON_FOLIO(folio_test_swapcache(folio), folio); + entries = 1; } /* Move dirty while page refs frozen and newpage not yet exposed */ @@ -441,7 +444,11 @@ int folio_migrate_mapping(struct address_space *mapping, folio_set_dirty(newfolio); } - xas_store(&xas, newfolio); + /* Swap cache still stores N entries instead of a high-order entry */ + for (i = 0; i < entries; i++) { + xas_store(&xas, newfolio); + xas_next(&xas); + } /* * Drop cache reference from old page by unfreezing