[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230617083043.2065556-1-linmiaohe@huawei.com>
Date: Sat, 17 Jun 2023 16:30:43 +0800
From: Miaohe Lin <linmiaohe@...wei.com>
To: <longman@...hat.com>, <tj@...nel.org>, <hannes@...xchg.org>,
<lizefan.x@...edance.com>
CC: <cgroups@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linmiaohe@...wei.com>
Subject: [PATCH] cgroup/cpuset: remove unneeded nodes_or() in cpuset_change_task_nodemask()
The tsk->mems_allowed is changed before calling mpol_rebind_task() and
being reassigned right after it. But tsk->mems_allowed is not needed
inside mpol_rebind_task(). So remove unneeded tsk->mems_allowed modify
via nodes_or() here.
Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
---
kernel/cgroup/cpuset.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 58e6f18f01c1..33a429c1179f 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -1941,7 +1941,6 @@ static void cpuset_change_task_nodemask(struct task_struct *tsk,
local_irq_disable();
write_seqcount_begin(&tsk->mems_allowed_seq);
- nodes_or(tsk->mems_allowed, tsk->mems_allowed, *newmems);
mpol_rebind_task(tsk, newmems);
tsk->mems_allowed = *newmems;
--
2.27.0
Powered by blists - more mailing lists