diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c index 20a4962d3e812c13fdb79b32855ffddd9170a316..1ade368e26315e335ad172579886e1ed2860743a 100644 --- a/fs/resctrl/rdtgroup.c +++ b/fs/resctrl/rdtgroup.c @@ -3758,7 +3758,7 @@ static void rdtgroup_destroy_root(void) rdtgroup_default.kn = NULL; } -static void __init rdtgroup_setup_default(void) +static void rdtgroup_setup_default(void) { mutex_lock(&rdtgroup_mutex); diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h index dd34523469a576d65120a86446f6c4259ae1c7ec..f4aeccd78afb0d2db61409da4dfa62c810e2ddd2 100644 --- a/include/linux/resctrl.h +++ b/include/linux/resctrl.h @@ -300,7 +300,7 @@ resctrl_get_domain_from_cpu(int cpu, struct rdt_resource *r) * about locks this thread holds will lead to false positives. Check * someone is holding the CPUs lock. */ - if (IS_ENABLED(CONFIG_LOCKDEP)) + if (IS_ENABLED(CONFIG_HOTPLUG_CPU) && IS_ENABLED(CONFIG_LOCKDEP)) lockdep_is_cpus_held(); list_for_each_entry_rcu(d, &r->domains, list) {