]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - mm/huge_memory.c
mm/hugetlb: add tlb_remove_hugetlb_entry for handling hugetlb pages
[mirror_ubuntu-artful-kernel.git] / mm / huge_memory.c
index d4a6e40015128c626f606e339474d8b23d90607e..0103728ffa94fdc5559eb131efe4bdc6c9286292 100644 (file)
@@ -737,8 +737,9 @@ int vmf_insert_pfn_pmd(struct vm_area_struct *vma, unsigned long addr,
 
        if (addr < vma->vm_start || addr >= vma->vm_end)
                return VM_FAULT_SIGBUS;
-       if (track_pfn_insert(vma, &pgprot, pfn))
-               return VM_FAULT_SIGBUS;
+
+       track_pfn_insert(vma, &pgprot, pfn);
+
        insert_pfn_pmd(vma, addr, pmd, pfn, pgprot, write);
        return VM_FAULT_NOPAGE;
 }
@@ -1398,12 +1399,12 @@ int zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
        if (vma_is_dax(vma)) {
                spin_unlock(ptl);
                if (is_huge_zero_pmd(orig_pmd))
-                       tlb_remove_page(tlb, pmd_page(orig_pmd));
+                       tlb_remove_page_size(tlb, pmd_page(orig_pmd), HPAGE_PMD_SIZE);
        } else if (is_huge_zero_pmd(orig_pmd)) {
                pte_free(tlb->mm, pgtable_trans_huge_withdraw(tlb->mm, pmd));
                atomic_long_dec(&tlb->mm->nr_ptes);
                spin_unlock(ptl);
-               tlb_remove_page(tlb, pmd_page(orig_pmd));
+               tlb_remove_page_size(tlb, pmd_page(orig_pmd), HPAGE_PMD_SIZE);
        } else {
                struct page *page = pmd_page(orig_pmd);
                page_remove_rmap(page, true);