aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index f924158a1b65..ae23814b0c6e 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -5124,6 +5124,8 @@ int __init cgroup_init_early(void)
5124 return 0; 5124 return 0;
5125} 5125}
5126 5126
5127static unsigned long cgroup_disable_mask __initdata;
5128
5127/** 5129/**
5128 * cgroup_init - cgroup initialization 5130 * cgroup_init - cgroup initialization
5129 * 5131 *
@@ -5170,8 +5172,12 @@ int __init cgroup_init(void)
5170 * disabled flag and cftype registration needs kmalloc, 5172 * disabled flag and cftype registration needs kmalloc,
5171 * both of which aren't available during early_init. 5173 * both of which aren't available during early_init.
5172 */ 5174 */
5173 if (!cgroup_ssid_enabled(ssid)) 5175 if (cgroup_disable_mask & (1 << ssid)) {
5176 static_branch_disable(cgroup_subsys_enabled_key[ssid]);
5177 printk(KERN_INFO "Disabling %s control group subsystem\n",
5178 ss->name);
5174 continue; 5179 continue;
5180 }
5175 5181
5176 cgrp_dfl_root.subsys_mask |= 1 << ss->id; 5182 cgrp_dfl_root.subsys_mask |= 1 << ss->id;
5177 5183
@@ -5595,11 +5601,7 @@ static int __init cgroup_disable(char *str)
5595 if (strcmp(token, ss->name) && 5601 if (strcmp(token, ss->name) &&
5596 strcmp(token, ss->legacy_name)) 5602 strcmp(token, ss->legacy_name))
5597 continue; 5603 continue;
5598 5604 cgroup_disable_mask |= 1 << i;
5599 static_branch_disable(cgroup_subsys_enabled_key[i]);
5600 printk(KERN_INFO "Disabling %s control group subsystem\n",
5601 ss->name);
5602 break;
5603 } 5605 }
5604 } 5606 }
5605 return 1; 5607 return 1;