Commit 21786e5c authored by Daniel Vacek's avatar Daniel Vacek Committed by Tejun Heo
Browse files

cgroup/cpuset: no need to explicitly init a global static variable



cpuset_rwsem is a static variable defined with DEFINE_STATIC_PERCPU_RWSEM().
It's initialized at build time and so there's no need for explicit runtime
init leaking one percpu int.

Signed-off-by: default avatarDaniel Vacek <neelx@redhat.com>
Reviewed-by: default avatarAaron Tomlin <atomlin@atomlin.com>
Acked-by: default avatarMukesh Ojha <quic_mojha@quicinc.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 512dee0c
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -3281,8 +3281,6 @@ struct cgroup_subsys cpuset_cgrp_subsys = {

int __init cpuset_init(void)
{
	BUG_ON(percpu_init_rwsem(&cpuset_rwsem));

	BUG_ON(!alloc_cpumask_var(&top_cpuset.cpus_allowed, GFP_KERNEL));
	BUG_ON(!alloc_cpumask_var(&top_cpuset.effective_cpus, GFP_KERNEL));
	BUG_ON(!zalloc_cpumask_var(&top_cpuset.subparts_cpus, GFP_KERNEL));