summaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2012-05-27 20:58:20 +0000
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2012-05-27 20:58:20 +0000
commitd85d135d8babbc917b370f36cbc02b7b4a2f2d99 (patch)
tree2f06e02940d87099670aa31459ad1ab41a1ca036 /mm/memcontrol.c
parent5e7b911f9a3e582635801675b7fe935b16cd4af5 (diff)
parente92a5b28f71aea01b281f9c89d97a4bc5b24748f (diff)
downloadlinux-d85d135d8babbc917b370f36cbc02b7b4a2f2d99.tar.bz2
Merge tag 'omapdss-for-3.5' of git://github.com/tomba/linux into fbdev-next
Omapdss driver changes for 3.5 merge window. Lots of normal development commits, but perhaps most notable changes are: * HDMI rework to properly decouple the HDMI audio part from the HDMI video part. * Restructure omapdss core driver so that it's possible to implement device tree support. This included changing how platform data is passed to the drivers, changing display device registration and improving the panel driver's ability to configure the underlying video output interface. * Basic support for DSI packet interleaving
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c7
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,
if (action == CPU_ONLINE)
return NOTIFY_OK;
- if ((action != CPU_DEAD) || action != CPU_DEAD_FROZEN)
+ if (action != CPU_DEAD && action != CPU_DEAD_FROZEN)
return NOTIFY_OK;
for_each_mem_cgroup(iter)
@@ -3392,6 +3392,7 @@ void mem_cgroup_replace_page_cache(struct page *oldpage,
* the newpage may be on LRU(or pagevec for LRU) already. We lock
* LRU while we overwrite pc->mem_cgroup.
*/
+ pc = lookup_page_cgroup(newpage);
__mem_cgroup_commit_charge(memcg, newpage, 1, pc, type, true);
}
@@ -3763,7 +3764,7 @@ move_account:
goto try_to_free;
cond_resched();
/* "ret" should also be checked to ensure all lists are empty. */
- } while (memcg->res.usage > 0 || ret);
+ } while (res_counter_read_u64(&memcg->res, RES_USAGE) > 0 || ret);
out:
css_put(&memcg->css);
return ret;
@@ -3778,7 +3779,7 @@ try_to_free:
lru_add_drain_all();
/* try to free all pages in this cgroup */
shrink = 1;
- while (nr_retries && memcg->res.usage > 0) {
+ while (nr_retries && res_counter_read_u64(&memcg->res, RES_USAGE) > 0) {
int progress;
if (signal_pending(current)) {