Re: [PATCH v3 12/13] mm/huge_memory: add and use normal_or_softleaf_folio_pmd()

Lorenzo Stoakes (Oracle)
2026-03-23T11:24:12Z

Hi Andrew,

Just a quick fix-patch for 12/13 to avoid a bisection hazard, as per
Sashiko. The next patch eliminates this case in any case.

Thanks, Lorenzo

----8<----
From 7c5c0a66517efba0e675e707f931cf8a3f1a4d87 Mon Sep 17 00:00:00 2001
From: "Lorenzo Stoakes (Oracle)" <ljs@kernel.org>
Date: Mon, 23 Mar 2026 11:22:32 +0000
Subject: [PATCH] fix

Signed-off-by: Lorenzo Stoakes (Oracle) <ljs@kernel.org>
---
mm/huge_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 5831966391bd..5d5d9ddca6ff 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2404,7 +2404,7 @@ bool zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
zap_huge_pmd_folio(mm, vma, orig_pmd, folio, is_present,
&has_deposit);
else if (is_huge_zero_pmd(orig_pmd))
- has_deposit = !vma_is_dax(vma);
+ has_deposit = has_deposit || !vma_is_dax(vma);

if (has_deposit)
zap_deposited_table(mm, pmd);
--
2.53.0