Skip to content

Commit 19fc8a8

Browse files
Xiu Jianfenghtejun
authored andcommitted
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 <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent f71bfbe commit 19fc8a8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/cgroup/cgroup-v1.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,6 +1335,7 @@ static int __init cgroup_no_v1(char *str)
13351335
continue;
13361336

13371337
cgroup_no_v1_mask |= 1 << i;
1338+
break;
13381339
}
13391340
}
13401341
return 1;

0 commit comments

Comments
 (0)