diff options
author | Tejun Heo <tj@kernel.org> | 2013-06-29 00:08:27 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-07-16 07:28:24 -0400 |
commit | a698b4488ab98deef6c3beeba3e27fea17650132 (patch) | |
tree | b165584741f936387a9bbb66e879f52fbcb0ea71 | |
parent | 1d5be6b287c8efc879fbe578e2b7bc8f7a38f313 (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>
-rw-r--r-- | kernel/cgroup.c | 9 |
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, | |||
1077 | /* subsystem is now free - drop reference on module */ | 1077 | /* subsystem is now free - drop reference on module */ |
1078 | module_put(ss->module); | 1078 | module_put(ss->module); |
1079 | root->subsys_mask &= ~bit; | 1079 | root->subsys_mask &= ~bit; |
1080 | } else if (bit & root->subsys_mask) { | ||
1081 | /* Subsystem state should already exist */ | ||
1082 | BUG_ON(!cgrp->subsys[i]); | ||
1083 | #ifdef CONFIG_MODULE_UNLOAD | ||
1084 | BUG_ON(ss->module && !module_refcount(ss->module)); | ||
1085 | #endif | ||
1086 | } else { | ||
1087 | /* Subsystem state shouldn't exist */ | ||
1088 | BUG_ON(cgrp->subsys[i]); | ||
1089 | } | 1080 | } |
1090 | } | 1081 | } |
1091 | 1082 | ||