aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 1358012ffa73..e5bfbe6b594c 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2000,7 +2000,7 @@ gotten:
2000 cow_user_page(new_page, old_page, address, vma); 2000 cow_user_page(new_page, old_page, address, vma);
2001 __SetPageUptodate(new_page); 2001 __SetPageUptodate(new_page);
2002 2002
2003 if (mem_cgroup_newpage_charge(new_page, mm, GFP_HIGHUSER_MOVABLE)) 2003 if (mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL))
2004 goto oom_free_new; 2004 goto oom_free_new;
2005 2005
2006 /* 2006 /*
@@ -2431,8 +2431,7 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
2431 lock_page(page); 2431 lock_page(page);
2432 delayacct_clear_flag(DELAYACCT_PF_SWAPIN); 2432 delayacct_clear_flag(DELAYACCT_PF_SWAPIN);
2433 2433
2434 if (mem_cgroup_try_charge_swapin(mm, page, 2434 if (mem_cgroup_try_charge_swapin(mm, page, GFP_KERNEL, &ptr)) {
2435 GFP_HIGHUSER_MOVABLE, &ptr) == -ENOMEM) {
2436 ret = VM_FAULT_OOM; 2435 ret = VM_FAULT_OOM;
2437 unlock_page(page); 2436 unlock_page(page);
2438 goto out; 2437 goto out;
@@ -2524,7 +2523,7 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
2524 goto oom; 2523 goto oom;
2525 __SetPageUptodate(page); 2524 __SetPageUptodate(page);
2526 2525
2527 if (mem_cgroup_newpage_charge(page, mm, GFP_HIGHUSER_MOVABLE)) 2526 if (mem_cgroup_newpage_charge(page, mm, GFP_KERNEL))
2528 goto oom_free_page; 2527 goto oom_free_page;
2529 2528
2530 entry = mk_pte(page, vma->vm_page_prot); 2529 entry = mk_pte(page, vma->vm_page_prot);
@@ -2615,8 +2614,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
2615 ret = VM_FAULT_OOM; 2614 ret = VM_FAULT_OOM;
2616 goto out; 2615 goto out;
2617 } 2616 }
2618 if (mem_cgroup_newpage_charge(page, 2617 if (mem_cgroup_newpage_charge(page, mm, GFP_KERNEL)) {
2619 mm, GFP_HIGHUSER_MOVABLE)) {
2620 ret = VM_FAULT_OOM; 2618 ret = VM_FAULT_OOM;
2621 page_cache_release(page); 2619 page_cache_release(page);
2622 goto out; 2620 goto out;