summaryrefslogtreecommitdiffstats
path: root/mm/huge_memory.c
diff options
context:
space:
mode:
authorLinus Torvalds2014-02-26 00:38:13 +0100
committerLinus Torvalds2014-02-26 00:38:13 +0100
commitd2a0476307e67a6e6a293563a4f4ad4ec79ac0e5 (patch)
tree45abc67e451fae6c0c4403014bb1cda4d2a1fe3a /mm/huge_memory.c
parentMerge tag 'dmaengine-fixes-3.14-rc4' of git://git.kernel.org/pub/scm/linux/ke... (diff)
parentMAINTAINERS: change mailing list address for Altera UART drivers (diff)
downloadkernel-qcow2-linux-d2a0476307e67a6e6a293563a4f4ad4ec79ac0e5.tar.gz
kernel-qcow2-linux-d2a0476307e67a6e6a293563a4f4ad4ec79ac0e5.tar.xz
kernel-qcow2-linux-d2a0476307e67a6e6a293563a4f4ad4ec79ac0e5.zip
Merge branch 'akpm' (patches from Andrew Morton)
Merge misc fixes from Andrew Morton. * emailed patches from Andrew Morton akpm@linux-foundation.org>: MAINTAINERS: change mailing list address for Altera UART drivers Makefile: fix build with make 3.80 again MAINTAINERS: update L: misuses Makefile: fix extra parenthesis typo when CC_STACKPROTECTOR_REGULAR is enabled ipc,mqueue: remove limits for the amount of system-wide queues memcg: change oom_info_lock to mutex mm, thp: fix infinite loop on memcg OOM drivers/fmc/fmc-write-eeprom.c: fix decimal permissions drivers/iommu/omap-iommu-debug.c: fix decimal permissions mm, hwpoison: release page on PageHWPoison() in __do_fault()
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r--mm/huge_memory.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index da23eb96779f..4df39b1bde91 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1166,8 +1166,10 @@ alloc:
} else {
ret = do_huge_pmd_wp_page_fallback(mm, vma, address,
pmd, orig_pmd, page, haddr);
- if (ret & VM_FAULT_OOM)
+ if (ret & VM_FAULT_OOM) {
split_huge_page(page);
+ ret |= VM_FAULT_FALLBACK;
+ }
put_page(page);
}
count_vm_event(THP_FAULT_FALLBACK);
@@ -1179,9 +1181,10 @@ alloc:
if (page) {
split_huge_page(page);
put_page(page);
- }
+ } else
+ split_huge_page_pmd(vma, address, pmd);
+ ret |= VM_FAULT_FALLBACK;
count_vm_event(THP_FAULT_FALLBACK);
- ret |= VM_FAULT_OOM;
goto out;
}