• Tejun Heo's avatar
    cgroup: introduce CSS_ONLINE flag and on/offline_css() helpers · a31f2d3f
    Tejun Heo authored
    New helpers on/offline_css() respectively wrap ->post_create() and
    ->pre_destroy() invocations.  online_css() sets CSS_ONLINE after
    ->post_create() is complete and offline_css() invokes ->pre_destroy()
    iff CSS_ONLINE is set and clears it while also handling the temporary
    dropping of cgroup_mutex.
    
    This patch doesn't introduce any behavior change at the moment but
    will be used to improve cgroup_create() failure path and allow
    ->post_create() to fail.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarLi Zefan <lizefan@huawei.com>
    a31f2d3f
cgroup.c 146 KB