|
@@ -232,7 +232,7 @@ retry:
|
|
return READ_ONCE(huge_zero_page);
|
|
return READ_ONCE(huge_zero_page);
|
|
}
|
|
}
|
|
|
|
|
|
-static void put_huge_zero_page(void)
|
|
|
|
|
|
+void put_huge_zero_page(void)
|
|
{
|
|
{
|
|
/*
|
|
/*
|
|
* Counter should never go to zero here. Only shrinker can put
|
|
* Counter should never go to zero here. Only shrinker can put
|
|
@@ -1684,12 +1684,12 @@ int zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
|
|
if (vma_is_dax(vma)) {
|
|
if (vma_is_dax(vma)) {
|
|
spin_unlock(ptl);
|
|
spin_unlock(ptl);
|
|
if (is_huge_zero_pmd(orig_pmd))
|
|
if (is_huge_zero_pmd(orig_pmd))
|
|
- put_huge_zero_page();
|
|
|
|
|
|
+ tlb_remove_page(tlb, pmd_page(orig_pmd));
|
|
} else if (is_huge_zero_pmd(orig_pmd)) {
|
|
} else if (is_huge_zero_pmd(orig_pmd)) {
|
|
pte_free(tlb->mm, pgtable_trans_huge_withdraw(tlb->mm, pmd));
|
|
pte_free(tlb->mm, pgtable_trans_huge_withdraw(tlb->mm, pmd));
|
|
atomic_long_dec(&tlb->mm->nr_ptes);
|
|
atomic_long_dec(&tlb->mm->nr_ptes);
|
|
spin_unlock(ptl);
|
|
spin_unlock(ptl);
|
|
- put_huge_zero_page();
|
|
|
|
|
|
+ tlb_remove_page(tlb, pmd_page(orig_pmd));
|
|
} else {
|
|
} else {
|
|
struct page *page = pmd_page(orig_pmd);
|
|
struct page *page = pmd_page(orig_pmd);
|
|
page_remove_rmap(page, true);
|
|
page_remove_rmap(page, true);
|