diff options
author | 2025-05-08 15:32:06 -0400 | |
---|---|---|
committer | 2025-05-09 07:32:19 -1000 | |
commit | 225c0360a8d92636835ca73e3144d78d876bb09c (patch) | |
tree | 37eb7bfccf704d66d88400a32c1c92533fc36cb2 | |
parent | cgroup/rstat: Improve cgroup_rstat_push_children() documentation (diff) | |
download | wireguard-linux-225c0360a8d92636835ca73e3144d78d876bb09c.tar.xz wireguard-linux-225c0360a8d92636835ca73e3144d78d876bb09c.zip |
cgroup/cpuset: drop useless cpumask_empty() in compute_effective_exclusive_cpumask()
Empty cpumasks can't intersect with any others. Therefore, testing for
non-emptyness is useless.
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r-- | kernel/cgroup/cpuset.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index d0143b3dce47..2a95bd6fe592 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -1402,14 +1402,12 @@ static int compute_effective_exclusive_cpumask(struct cpuset *cs, if (sibling == cs) continue; - if (!cpumask_empty(sibling->exclusive_cpus) && - cpumask_intersects(xcpus, sibling->exclusive_cpus)) { + if (cpumask_intersects(xcpus, sibling->exclusive_cpus)) { cpumask_andnot(xcpus, xcpus, sibling->exclusive_cpus); retval++; continue; } - if (!cpumask_empty(sibling->effective_xcpus) && - cpumask_intersects(xcpus, sibling->effective_xcpus)) { + if (cpumask_intersects(xcpus, sibling->effective_xcpus)) { cpumask_andnot(xcpus, xcpus, sibling->effective_xcpus); retval++; } |