|
@@ -2093,12 +2093,9 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
|
|
unlock_page(page);
|
|
|
|
|
|
if (write_access) {
|
|
|
- /* XXX: We could OR the do_wp_page code with this one? */
|
|
|
- if (do_wp_page(mm, vma, address,
|
|
|
- page_table, pmd, ptl, pte) & VM_FAULT_OOM) {
|
|
|
- mem_cgroup_uncharge_page(page);
|
|
|
- ret = VM_FAULT_OOM;
|
|
|
- }
|
|
|
+ ret |= do_wp_page(mm, vma, address, page_table, pmd, ptl, pte);
|
|
|
+ if (ret & VM_FAULT_ERROR)
|
|
|
+ ret &= VM_FAULT_ERROR;
|
|
|
goto out;
|
|
|
}
|
|
|
|