From: Miaohe Lin Date: Tue, 4 Jul 2023 11:30:49 +0000 (+0800) Subject: cgroup/cpuset: simplify the percpu kthreads check in update_tasks_cpumask() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a453be9725a1aa3f602f5b4c66eefd1fb4ba7c44;p=linux.git cgroup/cpuset: simplify the percpu kthreads check in update_tasks_cpumask() kthread_is_per_cpu() can be called directly without checking whether PF_KTHREAD is set in task->flags. So remove PF_KTHREAD check to make code more concise. Signed-off-by: Miaohe Lin Reviewed-by: Waiman Long Signed-off-by: Tejun Heo --- diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index 58e6f18f01c1b..601c40da8e033 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -1230,7 +1230,7 @@ static void update_tasks_cpumask(struct cpuset *cs, struct cpumask *new_cpus) /* * Percpu kthreads in top_cpuset are ignored */ - if ((task->flags & PF_KTHREAD) && kthread_is_per_cpu(task)) + if (kthread_is_per_cpu(task)) continue; cpumask_andnot(new_cpus, possible_mask, cs->subparts_cpus); } else {