cgroup: convert cgroup_subsys flag fields to bool bitfields
authorTejun Heo <tj@kernel.org>
Tue, 23 Feb 2016 15:00:50 +0000 (10:00 -0500)
committerTejun Heo <tj@kernel.org>
Tue, 23 Feb 2016 15:00:50 +0000 (10:00 -0500)
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
include/linux/cgroup-defs.h
kernel/cpuset.c
kernel/sched/core.c
kernel/sched/cpuacct.c

index 0abf6aa86c817a5bde6afd68b0794c282349148a..8fc3f04522890cb56fff22d29879c397107c9552 100644 (file)
@@ -444,7 +444,7 @@ struct cgroup_subsys {
        void (*free)(struct task_struct *task);
        void (*bind)(struct cgroup_subsys_state *root_css);
 
-       int early_init;
+       bool early_init:1;
 
        /*
         * If %false, this subsystem is properly hierarchical -
@@ -458,8 +458,8 @@ struct cgroup_subsys {
         * cases.  Eventually, all subsystems will be made properly
         * hierarchical and this will go away.
         */
-       bool broken_hierarchy;
-       bool warned_broken_hierarchy;
+       bool broken_hierarchy:1;
+       bool warned_broken_hierarchy:1;
 
        /* the following two fields are initialized automtically during boot */
        int id;
index 41989ab4db571cbf93d1a12738bc9afc3411e019..90899837ea78193c07c0d4f96cbcce26a266b63e 100644 (file)
@@ -2089,7 +2089,7 @@ struct cgroup_subsys cpuset_cgrp_subsys = {
        .attach         = cpuset_attach,
        .bind           = cpuset_bind,
        .legacy_cftypes = files,
-       .early_init     = 1,
+       .early_init     = true,
 };
 
 /**
index 44253adb3c36dc28fb84cf9fdda4609f59dc388c..0f5abc6e4ff3d7b540d4b2401b413d53ac05d4c3 100644 (file)
@@ -8706,7 +8706,7 @@ struct cgroup_subsys cpu_cgrp_subsys = {
        .can_attach     = cpu_cgroup_can_attach,
        .attach         = cpu_cgroup_attach,
        .legacy_cftypes = cpu_files,
-       .early_init     = 1,
+       .early_init     = true,
 };
 
 #endif /* CONFIG_CGROUP_SCHED */
index dd7cbb55bbf2c98591dd31603790676136eafd82..2ddaebf7469a371444987c1b01acda5107093650 100644 (file)
@@ -279,5 +279,5 @@ struct cgroup_subsys cpuacct_cgrp_subsys = {
        .css_alloc      = cpuacct_css_alloc,
        .css_free       = cpuacct_css_free,
        .legacy_cftypes = files,
-       .early_init     = 1,
+       .early_init     = true,
 };