Re: [PATCH v2 7/8] arm64: mte: pass the swap entry to mte_save_tags()

From: David Hildenbrand (Arm)

Date: Wed Sep 09 2026 - 10:34:55 EST


On 9/8/26 17:16, Tal Zussman wrote:
> arch_prepare_to_swap() derives a page from the folio only for
> mte_save_tags() to recompute the folio's swap entry from that page.
> Pass the entry in directly with folio_swap_entry(), matching
> mte_restore_tags(), and move the page_mte_tagged() check into the
> caller so we only compute the entry for tagged pages.
>
> __mte_invalidate_tags() loses its only user, so remove it and call
> mte_invalidate_tags() directly in the error path. This removes two
> calls to compound_head().
>
> No functional change.
>
> Signed-off-by: Tal Zussman <tz2294@xxxxxxxxxxxx>
> ---

Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>

--
Cheers,

David