Merge branch 'linux-3.10.61' into dev-kernel-3.10
[linux-3.10.git] / mm / filemap.c
index c2c0a58..af81de0 100644 (file)
@@ -1650,14 +1650,14 @@ int filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
                 * We found the page, so try async readahead before
                 * waiting for the lock.
                 */
-               memcg_oom = mem_cgroup_toggle_oom(false);
+               mem_cgroup_oom_disable();
                do_async_mmap_readahead(vma, ra, file, page, offset);
-               mem_cgroup_toggle_oom(memcg_oom);
+               mem_cgroup_oom_enable();
        } else if (!page) {
                /* No page in the page cache at all */
-               memcg_oom = mem_cgroup_toggle_oom(false);
+               mem_cgroup_oom_disable();
                do_sync_mmap_readahead(vma, ra, file, offset);
-               mem_cgroup_toggle_oom(memcg_oom);
+               mem_cgroup_oom_enable();
                count_vm_event(PGMAJFAULT);
                mem_cgroup_count_vm_event(vma->vm_mm, PGMAJFAULT);
                ret = VM_FAULT_MAJOR;