aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mm/memory.c b/mm/memory.c
index ba86b436b85f..54cf20ee0a83 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2326,16 +2326,17 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
2326 count_vm_event(PGMAJFAULT); 2326 count_vm_event(PGMAJFAULT);
2327 } 2327 }
2328 2328
2329 mark_page_accessed(page);
2330
2331 lock_page(page);
2332 delayacct_clear_flag(DELAYACCT_PF_SWAPIN);
2333
2329 if (mem_cgroup_charge(page, mm, GFP_KERNEL)) { 2334 if (mem_cgroup_charge(page, mm, GFP_KERNEL)) {
2330 delayacct_clear_flag(DELAYACCT_PF_SWAPIN);
2331 ret = VM_FAULT_OOM; 2335 ret = VM_FAULT_OOM;
2336 unlock_page(page);
2332 goto out; 2337 goto out;
2333 } 2338 }
2334 2339
2335 mark_page_accessed(page);
2336 lock_page(page);
2337 delayacct_clear_flag(DELAYACCT_PF_SWAPIN);
2338
2339 /* 2340 /*
2340 * Back out if somebody else already faulted in this pte. 2341 * Back out if somebody else already faulted in this pte.
2341 */ 2342 */