aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cgroup.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-06-24 18:21:47 -0400
committerTejun Heo <tj@kernel.org>2013-06-24 18:21:47 -0400
commita8a648c4acee2095262f7fa65b0d8a68a03c32e4 (patch)
tree8547cf0629054715b3541b9bbf2de6642ec9deba /include/linux/cgroup.h
parent9871bf9550d25e488cd2f0ce958d3f59f17fa720 (diff)
cgroup: remove cgroup->actual_subsys_mask
cgroup curiously has two subsystem masks, ->subsys_mask and ->actual_subsys_mask. The latter only exists because the new target subsys_mask is passed into rebind_subsystems() via @root>subsys_mask. rebind_subsystems() needs to know what the current mask is to decide how to reach the target mask so ->actual_subsys_mask is used as the temp location to remember the current state. Adding a temporary field to a permanent data structure is rather silly and can be misleading. Update rebind_subsystems() to take @added_mask and @removed_mask instead and remove @root->actual_subsys_mask. This patch shouldn't introduce any behavior changes. v2: Comment and description updated as suggested by Li. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r--include/linux/cgroup.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index ab27001a2c4a..4c1eceb8c439 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -286,18 +286,12 @@ enum {
286struct cgroupfs_root { 286struct cgroupfs_root {
287 struct super_block *sb; 287 struct super_block *sb;
288 288
289 /* 289 /* The bitmask of subsystems attached to this hierarchy */
290 * The bitmask of subsystems intended to be attached to this
291 * hierarchy
292 */
293 unsigned long subsys_mask; 290 unsigned long subsys_mask;
294 291
295 /* Unique id for this hierarchy. */ 292 /* Unique id for this hierarchy. */
296 int hierarchy_id; 293 int hierarchy_id;
297 294
298 /* The bitmask of subsystems currently attached to this hierarchy */
299 unsigned long actual_subsys_mask;
300
301 /* A list running through the attached subsystems */ 295 /* A list running through the attached subsystems */
302 struct list_head subsys_list; 296 struct list_head subsys_list;
303 297