aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/memcontrol.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index c31a310aa146..e0c2066495e3 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1737,11 +1737,12 @@ int mem_cgroup_try_charge_swapin(struct mm_struct *mm,
1737 goto charge_cur_mm; 1737 goto charge_cur_mm;
1738 /* 1738 /*
1739 * A racing thread's fault, or swapoff, may have already updated 1739 * A racing thread's fault, or swapoff, may have already updated
1740 * the pte, and even removed page from swap cache: return success 1740 * the pte, and even removed page from swap cache: in those cases
1741 * to go on to do_swap_page()'s pte_same() test, which should fail. 1741 * do_swap_page()'s pte_same() test will fail; but there's also a
1742 * KSM case which does need to charge the page.
1742 */ 1743 */
1743 if (!PageSwapCache(page)) 1744 if (!PageSwapCache(page))
1744 return 0; 1745 goto charge_cur_mm;
1745 mem = try_get_mem_cgroup_from_swapcache(page); 1746 mem = try_get_mem_cgroup_from_swapcache(page);
1746 if (!mem) 1747 if (!mem)
1747 goto charge_cur_mm; 1748 goto charge_cur_mm;