hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IAO6NS
--------------------------------
In commit a4130bbe35b2, we add a new path unmap_huge_pmd_locked(), so need to add memory reliable count in this path, i.e., add count in __discard_anon_folio_pmd_locked().
Fixes: a4130bbe35b2 ("mm/vmscan: avoid split lazyfree THP during shrink_folio_list()") Signed-off-by: Ma Wupeng mawupeng1@huawei.com Signed-off-by: Liu Shixin liushixin2@huawei.com --- mm/huge_memory.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index af6a5c840e276..a62c4dc2b9da7 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2933,6 +2933,7 @@ static bool __discard_anon_folio_pmd_locked(struct vm_area_struct *vma, folio_remove_rmap_pmd(folio, pmd_page(orig_pmd), vma); zap_deposited_table(mm, pmdp); add_mm_counter(mm, MM_ANONPAGES, -HPAGE_PMD_NR); + add_reliable_folio_counter(folio, mm, -HPAGE_PMD_NR); if (vma->vm_flags & VM_LOCKED) mlock_drain_local(); folio_put(folio);