summaryrefslogtreecommitdiffstats
path: root/kernel/cgroup
diff options
context:
space:
mode:
authorXiu Jianfeng <xiujianfeng@huawei.com>2024-04-19 08:53:16 +0000
committerTejun Heo <tj@kernel.org>2024-04-19 05:43:36 -1000
commit19fc8a896565ecebb3951664fd0eeab0a80314a1 (patch)
tree6b26a48a70d238aec6b4add1ae5af34995f015c7 /kernel/cgroup
parentf71bfbe1e281a707e7766eb0a59ba056dc0f29f9 (diff)
downloadlinux-19fc8a896565ecebb3951664fd0eeab0a80314a1.tar.gz
linux-19fc8a896565ecebb3951664fd0eeab0a80314a1.tar.bz2
linux-19fc8a896565ecebb3951664fd0eeab0a80314a1.zip
cgroup: Avoid unnecessary looping in cgroup_no_v1()
No need to continue the for_each_subsys loop after the token matches the name of subsys and cgroup_no_v1_mask is set. Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup')
-rw-r--r--kernel/cgroup/cgroup-v1.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c
index 520a11cb12f4..b9dbf6bf2779 100644
--- a/kernel/cgroup/cgroup-v1.c
+++ b/kernel/cgroup/cgroup-v1.c
@@ -1335,6 +1335,7 @@ static int __init cgroup_no_v1(char *str)
continue;
cgroup_no_v1_mask |= 1 << i;
+ break;
}
}
return 1;