X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=mm%2Fhuge_memory.c;fp=mm%2Fhuge_memory.c;h=46f96c23cc272cd03bcaaa4eb5db0ef56aca0a83;hb=27afc5dbda52ee3dbcd0bda7375c917c6936b470;hp=5b2c6875fc38daae41b1361bfc4041f91e6473a7;hpb=70e71ca0af244f48a5dcf56dc435243792e3a495;p=uclinux-h8%2Flinux.git diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 5b2c6875fc38..46f96c23cc27 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -804,7 +804,7 @@ int do_huge_pmd_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma, return VM_FAULT_OOM; if (unlikely(khugepaged_enter(vma, vma->vm_flags))) return VM_FAULT_OOM; - if (!(flags & FAULT_FLAG_WRITE) && + if (!(flags & FAULT_FLAG_WRITE) && !mm_forbids_zeropage(mm) && transparent_hugepage_use_zero_page()) { spinlock_t *ptl; pgtable_t pgtable; @@ -1399,7 +1399,8 @@ int zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma, * pgtable_trans_huge_withdraw after finishing pmdp related * operations. */ - orig_pmd = pmdp_get_and_clear(tlb->mm, addr, pmd); + orig_pmd = pmdp_get_and_clear_full(tlb->mm, addr, pmd, + tlb->fullmm); tlb_remove_pmd_tlb_entry(tlb, pmd, addr); pgtable = pgtable_trans_huge_withdraw(tlb->mm, pmd); if (is_huge_zero_pmd(orig_pmd)) {