Skip to content

Commit 21786e5

Browse files
Daniel Vacekhtejun
authored andcommitted
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 <[email protected]> Reviewed-by: Aaron Tomlin <[email protected]> Acked-by: Mukesh Ojha <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent 512dee0 commit 21786e5

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

kernel/cgroup/cpuset.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3281,8 +3281,6 @@ struct cgroup_subsys cpuset_cgrp_subsys = {
32813281

32823282
int __init cpuset_init(void)
32833283
{
3284-
BUG_ON(percpu_init_rwsem(&cpuset_rwsem));
3285-
32863284
BUG_ON(!alloc_cpumask_var(&top_cpuset.cpus_allowed, GFP_KERNEL));
32873285
BUG_ON(!alloc_cpumask_var(&top_cpuset.effective_cpus, GFP_KERNEL));
32883286
BUG_ON(!zalloc_cpumask_var(&top_cpuset.subparts_cpus, GFP_KERNEL));

0 commit comments

Comments
 (0)