• Tejun Heo's avatar
    cgroup: explicitly track whether a cgroup_subsys_state is visible to userland · 88cb04b9
    Tejun Heo authored
    Currently, whether a css (cgroup_subsys_state) has its interface files
    created is not tracked and assumed to change together with the owning
    cgroup's lifecycle.  cgroup directory and interface creation is being
    separated out from internal object creation to help refactoring and
    eventually allow cgroups which are not visible through cgroupfs.
    
    This patch adds CSS_VISIBLE to track whether a css has its interface
    files created and perform management operations only when necessary
    which helps decoupling interface file handling from internal object
    lifecycle.  After this patch, all css interface file management
    functions can be called regardless of the current state and will
    achieve the expected result.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarZefan Li <lizefan@huawei.com>
    88cb04b9
cgroup.c 163 KB