summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJian Guo <guojian@kylinos.cn>2026-07-17 19:06:06 +0800
committerTejun Heo <tj@kernel.org>2026-07-17 07:05:40 -1000
commit9133e0e2f7148044f0507211fd93724381f5122e (patch)
treed1e4438e5fc6da46a0c3e2c23ee0c793b8b0d644
parent98149f5425306cf0a1ed472b216da985b25350ff (diff)
downloadlinux-next-9133e0e2f7148044f0507211fd93724381f5122e.tar.gz
linux-next-9133e0e2f7148044f0507211fd93724381f5122e.zip
selftests/cgroup: Remove redundant cg_enter_current() call in test_core
The test_cgcore_no_internal_process_constraint_on_threads test has two back-to-back cg_enter_current(root) calls in its cleanup path. A single cg_enter_current() call atomically migrates the entire thread group to the target cgroup even for multi-threaded processes, and this test creates no extra threads or child processes that would require a second migration attempt. The second call is a harmless no-op once the process is already in the root cgroup, but it is redundant and inconsistent with the cleanup logic used in all other cgroup core selftest cases. Remove the duplicate call to clean up the code. No functional change is intended. Signed-off-by: Jian Guo <guojian@kylinos.cn> Acked-by: Michal Koutný <mkoutny@suse.com> Tested-by: Tao Cui <cuitao@kylinos.cn> Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r--tools/testing/selftests/cgroup/test_core.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/testing/selftests/cgroup/test_core.c b/tools/testing/selftests/cgroup/test_core.c
index 88ca832d4fc1..8e3f9b391e44 100644
--- a/tools/testing/selftests/cgroup/test_core.c
+++ b/tools/testing/selftests/cgroup/test_core.c
@@ -427,7 +427,6 @@ static int test_cgcore_no_internal_process_constraint_on_threads(const char *roo
cleanup:
cg_enter_current(root);
- cg_enter_current(root);
if (child)
cg_destroy(child);
if (parent)