summaryrefslogtreecommitdiffstats
path: root/kernel/cgroup
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2023-07-04 13:30:49 +0200
committerTejun Heo <tj@kernel.org>2023-07-10 22:24:56 +0200
commita453be9725a1aa3f602f5b4c66eefd1fb4ba7c44 (patch)
tree1f89c9c6bd603d1bccc47411bdf230edffc1e67e /kernel/cgroup
parentcgroup: minor cleanup for cgroup_extra_stat_show() (diff)
downloadlinux-a453be9725a1aa3f602f5b4c66eefd1fb4ba7c44.tar.xz
linux-a453be9725a1aa3f602f5b4c66eefd1fb4ba7c44.zip
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 <linmiaohe@huawei.com> Reviewed-by: Waiman Long <longman@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup')
-rw-r--r--kernel/cgroup/cpuset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 58e6f18f01c1..601c40da8e03 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 {