X-Git-Url: http://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=blobdiff_plain;f=mm%2Fmemory.c;h=0d14d1e58a5fa78e6b6a01369cc1e0869c77dfe9;hp=7f8c03ec587c1db05ef83384282c89dc54e93cb3;hb=61469f1d51777fc3b6d8d70da8373ee77ee13349;hpb=6dbf6d3bb955d5a92005b6ecd6ffad2c5b95b963 diff --git a/mm/memory.c b/mm/memory.c index 7f8c03e..0d14d1e 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, 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; }