diff options
author | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-03-21 23:34:26 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-22 00:55:02 (GMT) |
commit | 45f3e385b7a639c633d7a4b1e863c2d52b918258 (patch) | |
tree | 8f0c068aff36cc4f915899ed68d2e8686d75b069 /mm/memcontrol.c | |
parent | 13fd1dd9db345f6b2babd1e80a1c929092eb4896 (diff) | |
download | linux-45f3e385b7a639c633d7a4b1e863c2d52b918258.tar.xz |
mm/memcontrol.c: remove redundant BUG_ON() in mem_cgroup_usage_unregister_event()
In the following code:
if (type == _MEM)
thresholds = &memcg->thresholds;
else if (type == _MEMSWAP)
thresholds = &memcg->memsw_thresholds;
else
BUG();
BUG_ON(!thresholds);
The BUG_ON() seems redundant.
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index c200875..4dc9709 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -4467,12 +4467,6 @@ static void mem_cgroup_usage_unregister_event(struct cgroup *cgrp, else BUG(); - /* - * Something went wrong if we trying to unregister a threshold - * if we don't have thresholds - */ - BUG_ON(!thresholds); - if (!thresholds->primary) goto unlock; |