summaryrefslogtreecommitdiff
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-07-27 10:42:48 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-07-27 10:42:52 +0100
commit4708ac49305bbcd511600d4af71a4c6dca15af65 (patch)
tree77ba5c83a7d4f4a119e3fd524d82adc297df1e35 /mm/memcontrol.c
parent1dbd30e9890fd69e50b17edd70ca583546b0fe4e (diff)
parent2f7989efd4398d92b8adffce2e07dd043a0895fe (diff)
Merge branch 'origin' into misc
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index c6ece0a57595..20a8193a7af8 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1370,7 +1370,7 @@ static void memcg_wakeup_oom(struct mem_cgroup *mem)
static void memcg_oom_recover(struct mem_cgroup *mem)
{
- if (mem->oom_kill_disable && atomic_read(&mem->oom_lock))
+ if (atomic_read(&mem->oom_lock))
memcg_wakeup_oom(mem);
}
@@ -3781,6 +3781,8 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,
return -EINVAL;
}
mem->oom_kill_disable = val;
+ if (!val)
+ memcg_oom_recover(mem);
cgroup_unlock();
return 0;
}