summaryrefslogtreecommitdiff
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index a18e228f140b..848fc6c195d2 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1885,7 +1885,11 @@ enum mem_cgroup_filter_t
mem_cgroup_soft_reclaim_eligible(struct mem_cgroup *memcg,
struct mem_cgroup *root)
{
- struct mem_cgroup *parent = memcg;
+ struct mem_cgroup *parent;
+
+ if (!memcg)
+ memcg = root_mem_cgroup;
+ parent = memcg;
if (res_counter_soft_limit_excess(&memcg->res))
return VISIT;