diff --git a/arch/arm64/mm/copypage.c b/arch/arm64/mm/copypage.cI wonder why we had a 'return' here originally rather than a
index 87b3f1a25535..ef303a2262c5 100644
--- a/arch/arm64/mm/copypage.c
+++ b/arch/arm64/mm/copypage.c
@@ -30,9 +30,9 @@ void copy_highpage(struct page *to, struct page *from)
if (!system_supports_mte())
return;
- if (folio_test_hugetlb(src) &&
- folio_test_hugetlb_mte_tagged(src)) {
- if (!folio_try_hugetlb_mte_tagging(dst))
+ if (folio_test_hugetlb(src)) {
+ if (!folio_test_hugetlb_mte_tagged(src) ||
+ !folio_try_hugetlb_mte_tagging(dst))
return;
/*
WARN_ON_ONCE() as we do further down for the page case. Do you seen any
issue with the hunk below? Destination should be a new folio and not
tagged yet:
Yes, I did see problem. Because we copy tags for all sub pages then set
folio mte tagged when copying the data for the first subpage. The
warning will be triggered when we copy the second subpage.