File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -6090,7 +6090,6 @@ mem_cgroup_css_alloc(struct cgroup *cont)
60906090 & per_cpu (memcg_stock , cpu );
60916091 INIT_WORK (& stock -> work , drain_local_stock );
60926092 }
6093- hotcpu_notifier (memcg_cpu_hotplug_callback , 0 );
60946093 } else {
60956094 parent = mem_cgroup_from_cont (cont -> parent );
60966095 memcg -> use_hierarchy = parent -> use_hierarchy ;
@@ -6756,6 +6755,19 @@ struct cgroup_subsys mem_cgroup_subsys = {
67566755 .use_id = 1 ,
67576756};
67586757
6758+ /*
6759+ * The rest of init is performed during ->css_alloc() for root css which
6760+ * happens before initcalls. hotcpu_notifier() can't be done together as
6761+ * it would introduce circular locking by adding cgroup_lock -> cpu hotplug
6762+ * dependency. Do it from a subsys_initcall().
6763+ */
6764+ static int __init mem_cgroup_init (void )
6765+ {
6766+ hotcpu_notifier (memcg_cpu_hotplug_callback , 0 );
6767+ return 0 ;
6768+ }
6769+ subsys_initcall (mem_cgroup_init );
6770+
67596771#ifdef CONFIG_MEMCG_SWAP
67606772static int __init enable_swap_account (char * s )
67616773{
You can’t perform that action at this time.
0 commit comments