diff options
author | Mark Brown <broonie@linaro.org> | 2014-03-19 13:02:34 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-19 13:02:34 +0000 |
commit | 236b11de51c7501c454ca125d84152b06ef7f27e (patch) | |
tree | d0ca0b99961da2a8a46b4f86a57de8424dadce1d /mm/memory.c | |
parent | 0f4cc282951a76011db1da6787b3d2acc63238ca (diff) | |
parent | ba3e31f87e8b736adf01f1dc09cd5618966ee193 (diff) | |
download | linux-236b11de51c7501c454ca125d84152b06ef7f27e.tar.gz linux-236b11de51c7501c454ca125d84152b06ef7f27e.tar.xz |
Merge branch 'ib-mfd-regulator-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into regulator-s2mps11
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/mm/memory.c b/mm/memory.c index be6a0c0d4ae0..22dfa617bddb 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3348,6 +3348,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma, if (ret & VM_FAULT_LOCKED) unlock_page(vmf.page); ret = VM_FAULT_HWPOISON; + page_cache_release(vmf.page); goto uncharge_out; } @@ -3703,7 +3704,6 @@ static int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, if (unlikely(is_vm_hugetlb_page(vma))) return hugetlb_fault(mm, vma, address, flags); -retry: pgd = pgd_offset(mm, address); pud = pud_alloc(mm, pgd, address); if (!pud) @@ -3741,20 +3741,13 @@ retry: if (dirty && !pmd_write(orig_pmd)) { ret = do_huge_pmd_wp_page(mm, vma, address, pmd, orig_pmd); - /* - * If COW results in an oom, the huge pmd will - * have been split, so retry the fault on the - * pte for a smaller charge. - */ - if (unlikely(ret & VM_FAULT_OOM)) - goto retry; - return ret; + if (!(ret & VM_FAULT_FALLBACK)) + return ret; } else { huge_pmd_set_accessed(mm, vma, address, pmd, orig_pmd, dirty); + return 0; } - - return 0; } } |