Re: [PATCH 1/7] mm/migrate: rename PAGE_ migration flags to FOLIO_
From: Garg, Shivank
Date: Tue Jun 09 2026 - 02:18:45 EST
On 6/9/2026 11:04 AM, Dev Jain wrote:
>
>
> On 28/04/26 9:20 pm, Shivank Garg wrote:
>> These flags only track folio-specific state during migration and are
>> not used for movable_ops pages. Rename the enum values and the
>> old_page_state variable to match.
>>
>> No functional change.
>>
>> Suggested-by: David Hildenbrand <david@xxxxxxxxxx>
>> Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
>> Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>
>> Reviewed-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>
>> Reviewed-by: Lance Yang <lance.yang@xxxxxxxxx>
>> Signed-off-by: Shivank Garg <shivankg@xxxxxxx>
>> ---
>
> migrate_folio_undo_src() has a parameter "page_was_mapped", change that
> too?
>
>
Thanks, Dev. Right.
This patch is already in mm-stable tree and it's fairly late in this cycle.
So, not sure if the last minute changes are okay for this?
Given this, I'll leave the timing to the maintainers:
I can fold this and resend now, or send it early next cycle?
Best Regards,
Shivank
---
mm/migrate.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index 0c6a0ab6ecce..fd524f9e6fae 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1157,13 +1157,10 @@ static void __migrate_folio_extract(struct folio *dst,
}
/* Restore the source folio to the original state upon failure */
-static void migrate_folio_undo_src(struct folio *src,
- int page_was_mapped,
- struct anon_vma *anon_vma,
- bool locked,
- struct list_head *ret)
+static void migrate_folio_undo_src(struct folio *src, int folio_was_mapped,
+ struct anon_vma *anon_vma, bool locked, struct list_head *ret)
{
- if (page_was_mapped)
+ if (folio_was_mapped)
remove_migration_ptes(src, src, 0);
/* Drop an anon_vma reference if we took one */
if (anon_vma)
--
2.43.0