Message ID | 20210429132648.305447-6-linmiaohe@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Cleanup and fixup for huge_memory | expand |
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index af30338ac49c..87b0241394f4 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1607,7 +1607,7 @@ bool madvise_free_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma, * If other processes are mapping this page, we couldn't discard * the page unless they all do MADV_FREE so let's skip the page. */ - if (page_mapcount(page) != 1) + if (total_mapcount(page) != 1) goto out; if (!trylock_page(page))