summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-06-28 21:08:27 -0700
committerTejun Heo <tj@kernel.org>2013-07-16 05:28:24 -0600
commita698b4488ab98deef6c3beeba3e27fea17650132 (patch)
treeb165584741f936387a9bbb66e879f52fbcb0ea71 /kernel
parent1d5be6b287c8efc879fbe578e2b7bc8f7a38f313 (diff)
cgroup: remove gratuituous BUG_ON()s from rebind_subsystems()
rebind_subsystems() performs santiy checks even on subsystems which aren't specified to be added or removed and the checks aren't all that useful given that these are in a very cold path while the violations they check would trip up in much hotter paths. Let's remove these from rebind_subsystems(). Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cgroup.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 2a8cf1a7d2f4..345fac8e4fba 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1077,15 +1077,6 @@ static int rebind_subsystems(struct cgroupfs_root *root,
/* subsystem is now free - drop reference on module */
module_put(ss->module);
root->subsys_mask &= ~bit;
- } else if (bit & root->subsys_mask) {
- /* Subsystem state should already exist */
- BUG_ON(!cgrp->subsys[i]);
-#ifdef CONFIG_MODULE_UNLOAD
- BUG_ON(ss->module && !module_refcount(ss->module));
-#endif
- } else {
- /* Subsystem state shouldn't exist */
- BUG_ON(cgrp->subsys[i]);
}
}