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

From: Lorenzo Stoakes (Oracle)

Date: Mon Mar 23 2026 - 07:45:29 EST


Hi Andrew,

Could you apply the below fix-patch to resolve an issue with us performing
folio_put() on a folio before checking it again to see if a table was
deposited, as per Sashiko.

This patch resolves the issue by storing whether or not this is the case in
a has_deposit local variable (as used previously) before invoking
zap_huge_pmd_folio(), then using this boolean to determine whether or not
to zap any deposited table.

Thanks, Lorenzo

----8<----