diff options
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 7f1a356153c0..0e10f1a3535d 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1100,10 +1100,8 @@ skip_node: * protected by css_get and the tree walk is rcu safe. */ if (next_css) { - struct mem_cgroup *mem = mem_cgroup_from_css(next_css); - - if (css_tryget(&mem->css)) - return mem; + if ((next_css->flags & CSS_ONLINE) && css_tryget(next_css)) + return mem_cgroup_from_css(next_css); else { prev_css = next_css; goto skip_node; |