diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memcontrol.c | 4 |
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) | |||
1370 | 1370 | ||
1371 | static void memcg_oom_recover(struct mem_cgroup *mem) | 1371 | static void memcg_oom_recover(struct mem_cgroup *mem) |
1372 | { | 1372 | { |
1373 | if (mem->oom_kill_disable && atomic_read(&mem->oom_lock)) | 1373 | if (atomic_read(&mem->oom_lock)) |
1374 | memcg_wakeup_oom(mem); | 1374 | memcg_wakeup_oom(mem); |
1375 | } | 1375 | } |
1376 | 1376 | ||
@@ -3781,6 +3781,8 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp, | |||
3781 | return -EINVAL; | 3781 | return -EINVAL; |
3782 | } | 3782 | } |
3783 | mem->oom_kill_disable = val; | 3783 | mem->oom_kill_disable = val; |
3784 | if (!val) | ||
3785 | memcg_oom_recover(mem); | ||
3784 | cgroup_unlock(); | 3786 | cgroup_unlock(); |
3785 | return 0; | 3787 | return 0; |
3786 | } | 3788 | } |