• Tejun Heo's avatar
    cgroup: implement css_tryget() · 6f4524d3
    Tejun Heo authored
    Implement css_tryget() which tries to grab a cgroup_subsys_state's
    reference as long as it already hasn't reached zero.  Combined with
    the recent css iterator changes to include offline && !released csses
    during traversal, this can be used to access csses regardless of its
    online state.
    
    v2: Take the new flag CSS_NO_REF into account.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarLi Zefan <lizefan@huawei.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    6f4524d3
cgroup.h 28.9 KB