Commit 225c0360 authored by Yury Norov's avatar Yury Norov Committed by Tejun Heo
Browse files

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: default avatarYury Norov <yury.norov@gmail.com>
Reviewed-by: default avatarWaiman Long <longman@redhat.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 8f52633c
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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++;
		}