summaryrefslogtreecommitdiffstats
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, 2 insertions, 4 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index aa66cc4..9537e13 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1119,10 +1119,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;
OpenPOWER on IntegriCloud