aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/memory.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 7f8c03ec587c..0d14d1e58a5f 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2093,12 +2093,9 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
2093 unlock_page(page); 2093 unlock_page(page);
2094 2094
2095 if (write_access) { 2095 if (write_access) {
2096 /* XXX: We could OR the do_wp_page code with this one? */ 2096 ret |= do_wp_page(mm, vma, address, page_table, pmd, ptl, pte);
2097 if (do_wp_page(mm, vma, address, 2097 if (ret & VM_FAULT_ERROR)
2098 page_table, pmd, ptl, pte) & VM_FAULT_OOM) { 2098 ret &= VM_FAULT_ERROR;
2099 mem_cgroup_uncharge_page(page);
2100 ret = VM_FAULT_OOM;
2101 }
2102 goto out; 2099 goto out;
2103 } 2100 }
2104 2101