aboutsummaryrefslogtreecommitdiffstats
path: root/mm/huge_memory.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2016-12-12 19:42:31 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-12 21:55:07 -0500
commitc0f2e176f87bd989835bd098a52779df41a9243c (patch)
tree0d640ffd72512bf87910f79e0b45d5557ed068fa /mm/huge_memory.c
parent23f919d4ad0eb325595f10f55be4301b2965d6d6 (diff)
mm: use the correct page size when removing the page
We are removing a pmd hugepage here. Use the correct page size. Link: http://lkml.kernel.org/r/20161026084839.27299-2-aneesh.kumar@linux.vnet.ibm.com Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: "Kirill A. Shutemov" <kirill@shutemov.name> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r--mm/huge_memory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index f8e35cc66d32..0103728ffa94 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1399,12 +1399,12 @@ int zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
1399 if (vma_is_dax(vma)) { 1399 if (vma_is_dax(vma)) {
1400 spin_unlock(ptl); 1400 spin_unlock(ptl);
1401 if (is_huge_zero_pmd(orig_pmd)) 1401 if (is_huge_zero_pmd(orig_pmd))
1402 tlb_remove_page(tlb, pmd_page(orig_pmd)); 1402 tlb_remove_page_size(tlb, pmd_page(orig_pmd), HPAGE_PMD_SIZE);
1403 } else if (is_huge_zero_pmd(orig_pmd)) { 1403 } else if (is_huge_zero_pmd(orig_pmd)) {
1404 pte_free(tlb->mm, pgtable_trans_huge_withdraw(tlb->mm, pmd)); 1404 pte_free(tlb->mm, pgtable_trans_huge_withdraw(tlb->mm, pmd));
1405 atomic_long_dec(&tlb->mm->nr_ptes); 1405 atomic_long_dec(&tlb->mm->nr_ptes);
1406 spin_unlock(ptl); 1406 spin_unlock(ptl);
1407 tlb_remove_page(tlb, pmd_page(orig_pmd)); 1407 tlb_remove_page_size(tlb, pmd_page(orig_pmd), HPAGE_PMD_SIZE);
1408 } else { 1408 } else {
1409 struct page *page = pmd_page(orig_pmd); 1409 struct page *page = pmd_page(orig_pmd);
1410 page_remove_rmap(page, true); 1410 page_remove_rmap(page, true);