aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index f9ae4b4c36eb..f7b910fc14fb 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3361,12 +3361,6 @@ static int mem_cgroup_register_event(struct cgroup *cgrp, struct cftype *cft,
3361 } 3361 }
3362 } 3362 }
3363 3363
3364 /*
3365 * We need to increment refcnt to be sure that all thresholds
3366 * will be unregistered before calling __mem_cgroup_free()
3367 */
3368 mem_cgroup_get(memcg);
3369
3370 if (type == _MEM) 3364 if (type == _MEM)
3371 rcu_assign_pointer(memcg->thresholds, thresholds_new); 3365 rcu_assign_pointer(memcg->thresholds, thresholds_new);
3372 else 3366 else
@@ -3460,9 +3454,6 @@ assign:
3460 /* To be sure that nobody uses thresholds before freeing it */ 3454 /* To be sure that nobody uses thresholds before freeing it */
3461 synchronize_rcu(); 3455 synchronize_rcu();
3462 3456
3463 for (i = 0; i < thresholds->size - size; i++)
3464 mem_cgroup_put(memcg);
3465
3466 kfree(thresholds); 3457 kfree(thresholds);
3467unlock: 3458unlock:
3468 mutex_unlock(&memcg->thresholds_lock); 3459 mutex_unlock(&memcg->thresholds_lock);