• Tejun Heo's avatar
    cgroup: factor out cgroup_apply_control_disable() from cgroup_subtree_control_write() · 12b3bb6a
    Tejun Heo authored
    Factor out css disabling and hiding into cgroup_apply_control_disable().
    
    * Nest subsystem walk inside child walk.  The child walk will later be
      converted to subtree walk which is a bit more expensive.
    
    * Instead of operating on the differential masks @css_enable and
      @css_disable, simply disable or hide csses according to the current
      cgroup_control() and cgroup_ss_mask().  This leads to the same
      result and is simpler and more robust.
    
    * This allows error handling path to share the same code.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarZefan Li <lizefan@huawei.com>
    12b3bb6a
cgroup.c 164 KB