[PATCH] fix
From: Lorenzo Stoakes (Oracle)
Date: Mon Mar 23 2026 - 07:42:01 EST
Signed-off-by: Lorenzo Stoakes (Oracle) <ljs@xxxxxxxxxx>
---
mm/huge_memory.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 610a6184e92c..4585465eda0c 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2397,6 +2397,7 @@ bool zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
struct mm_struct *mm = tlb->mm;
struct folio *folio = NULL;
bool is_present = false;
+ bool has_deposit;
spinlock_t *ptl;
pmd_t orig_pmd;
@@ -2420,8 +2421,8 @@ bool zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
folio = normal_or_softleaf_folio_pmd(vma, addr, orig_pmd, is_present);
if (folio)
zap_huge_pmd_folio(mm, vma, orig_pmd, folio, is_present);
-
- if (has_deposited_pgtable(vma, orig_pmd, folio))
+ has_deposit = has_deposited_pgtable(vma, orig_pmd, folio);
+ if (has_deposit)
zap_deposited_table(mm, pmd);
spin_unlock(ptl);
--
2.53.0