Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cpuset: remove dead code in cpuset-v1.c

The commit 6e1d31ce495c ("cpuset: separate generate_sched_domains for v1
and v2") introduced dead code that was originally added for cpuset-v2
partition domain generation. Remove the redundant root_load_balance check.

Fixes: 6e1d31ce495c ("cpuset: separate generate_sched_domains for v1 and v2")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/cgroups/9a442808-ed53-4657-988b-882cc0014c0d@huaweicloud.com/T/
Signed-off-by: Chen Ridong <chenridong@huawei.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Chen Ridong and committed by
Tejun Heo
269679bd 7cc17205

+1 -4
+1 -4
kernel/cgroup/cpuset-v1.c
··· 605 605 int ndoms = 0; /* number of sched domains in result */ 606 606 int nslot; /* next empty doms[] struct cpumask slot */ 607 607 struct cgroup_subsys_state *pos_css; 608 - bool root_load_balance = is_sched_load_balance(&top_cpuset); 609 608 int nslot_update; 610 609 611 610 lockdep_assert_cpuset_lock_held(); ··· 614 615 csa = NULL; 615 616 616 617 /* Special case for the 99% of systems with one, full, sched domain */ 617 - if (root_load_balance) { 618 + if (is_sched_load_balance(&top_cpuset)) { 618 619 ndoms = 1; 619 620 doms = alloc_sched_domains(ndoms); 620 621 if (!doms) ··· 637 638 csn = 0; 638 639 639 640 rcu_read_lock(); 640 - if (root_load_balance) 641 - csa[csn++] = &top_cpuset; 642 641 cpuset_for_each_descendant_pre(cp, pos_css, &top_cpuset) { 643 642 if (cp == &top_cpuset) 644 643 continue;