From: Daniel Vacek Date: Tue, 20 Dec 2022 15:14:15 +0000 (+0100) Subject: cgroup/cpuset: no need to explicitly init a global static variable X-Git-Tag: v6.6.7~3508^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21786e5cb375a1e58a9175fee423e1d7f892d965;p=platform%2Fkernel%2Flinux-starfive.git 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: Daniel Vacek Reviewed-by: Aaron Tomlin Acked-by: Mukesh Ojha Signed-off-by: Tejun Heo --- diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index a29c0b1..87fe410 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -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));