diff options
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 7d698df4a067..b868def9bcc1 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -2165,7 +2165,7 @@ static int __cpuinit memcg_cpu_hotplug_callback(struct notifier_block *nb, | |||
2165 | if (action == CPU_ONLINE) | 2165 | if (action == CPU_ONLINE) |
2166 | return NOTIFY_OK; | 2166 | return NOTIFY_OK; |
2167 | 2167 | ||
2168 | if ((action != CPU_DEAD) || action != CPU_DEAD_FROZEN) | 2168 | if (action != CPU_DEAD && action != CPU_DEAD_FROZEN) |
2169 | return NOTIFY_OK; | 2169 | return NOTIFY_OK; |
2170 | 2170 | ||
2171 | for_each_mem_cgroup(iter) | 2171 | for_each_mem_cgroup(iter) |
@@ -3392,6 +3392,7 @@ void mem_cgroup_replace_page_cache(struct page *oldpage, | |||
3392 | * the newpage may be on LRU(or pagevec for LRU) already. We lock | 3392 | * the newpage may be on LRU(or pagevec for LRU) already. We lock |
3393 | * LRU while we overwrite pc->mem_cgroup. | 3393 | * LRU while we overwrite pc->mem_cgroup. |
3394 | */ | 3394 | */ |
3395 | pc = lookup_page_cgroup(newpage); | ||
3395 | __mem_cgroup_commit_charge(memcg, newpage, 1, pc, type, true); | 3396 | __mem_cgroup_commit_charge(memcg, newpage, 1, pc, type, true); |
3396 | } | 3397 | } |
3397 | 3398 | ||
@@ -3763,7 +3764,7 @@ move_account: | |||
3763 | goto try_to_free; | 3764 | goto try_to_free; |
3764 | cond_resched(); | 3765 | cond_resched(); |
3765 | /* "ret" should also be checked to ensure all lists are empty. */ | 3766 | /* "ret" should also be checked to ensure all lists are empty. */ |
3766 | } while (memcg->res.usage > 0 || ret); | 3767 | } while (res_counter_read_u64(&memcg->res, RES_USAGE) > 0 || ret); |
3767 | out: | 3768 | out: |
3768 | css_put(&memcg->css); | 3769 | css_put(&memcg->css); |
3769 | return ret; | 3770 | return ret; |
@@ -3778,7 +3779,7 @@ try_to_free: | |||
3778 | lru_add_drain_all(); | 3779 | lru_add_drain_all(); |
3779 | /* try to free all pages in this cgroup */ | 3780 | /* try to free all pages in this cgroup */ |
3780 | shrink = 1; | 3781 | shrink = 1; |
3781 | while (nr_retries && memcg->res.usage > 0) { | 3782 | while (nr_retries && res_counter_read_u64(&memcg->res, RES_USAGE) > 0) { |
3782 | int progress; | 3783 | int progress; |
3783 | 3784 | ||
3784 | if (signal_pending(current)) { | 3785 | if (signal_pending(current)) { |