Skip to content

Commit

Permalink
cgroup_fj_common.sh: Simplify fix
Browse files Browse the repository at this point in the history
I merged in 6e13426 by accident v1. No functional change, just
slightly more readable.

Link: https://lore.kernel.org/ltp/[email protected]/
Reviewed-by: Petr Vorel <[email protected]>
Signed-off-by: Ma Xinjian <[email protected]>
Signed-off-by: Petr Vorel <[email protected]>
  • Loading branch information
MaXinjian authored and pevik committed Aug 21, 2024
1 parent 67da60d commit 7a28452
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,12 @@ common_cleanup()

cgroup_cleanup

if [ "$cgroup_version" = "2" ] && [ "$subsystem" != "cpu" ] && [ "$subsystem" != "io" ] \
&& [ "$subsystem" != "memory" ] && [ "$subsystem" != "pids" ]; then
ROD echo "-$subsystem" \> "/sys/fs/cgroup/cgroup.subtree_control"
if [ "$cgroup_version" = "2" ]; then
case "$subsystem" in
cpu|io|memory|pids)
:;;
*) ROD echo "-$subsystem" \> "/sys/fs/cgroup/cgroup.subtree_control";;
esac
fi
}

Expand Down

0 comments on commit 7a28452

Please sign in to comment.