• Tejun Heo's avatar
    cgroup: make cgroup_calc_subtree_ss_mask() take @this_ss_mask · 5ced2518
    Tejun Heo authored
    cgroup_calc_subtree_ss_mask() currently takes @cgrp and
    @subtree_control.  @cgrp is used for two purposes - to decide whether
    it's for default hierarchy and the mask of available subsystems.  The
    former doesn't matter as the results are the same regardless.  The
    latter can be specified directly through a subsystem mask.
    
    This patch makes cgroup_calc_subtree_ss_mask() perform the same
    calculations for both default and legacy hierarchies and take
    @this_ss_mask for available subsystems.  @cgrp is no longer used and
    dropped.  This is to allow using the function in contexts where
    available controllers can't be decided from the cgroup.
    
    v2: cgroup_refres_subtree_ss_mask() is removed by a previous patch.
        Updated accordingly.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarZefan Li <lizefan@huawei.com>
    5ced2518
cgroup.c 166 KB