aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 1c9dc46da3db..a54b2c498444 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2561,6 +2561,12 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
2561 lock_page(page); 2561 lock_page(page);
2562 delayacct_clear_flag(DELAYACCT_PF_SWAPIN); 2562 delayacct_clear_flag(DELAYACCT_PF_SWAPIN);
2563 2563
2564 page = ksm_might_need_to_copy(page, vma, address);
2565 if (!page) {
2566 ret = VM_FAULT_OOM;
2567 goto out;
2568 }
2569
2564 if (mem_cgroup_try_charge_swapin(mm, page, GFP_KERNEL, &ptr)) { 2570 if (mem_cgroup_try_charge_swapin(mm, page, GFP_KERNEL, &ptr)) {
2565 ret = VM_FAULT_OOM; 2571 ret = VM_FAULT_OOM;
2566 goto out_page; 2572 goto out_page;