• Tejun Heo's avatar
    cgroup: remove cgroup_pidlist->use_count · 04502365
    Tejun Heo authored
    After the recent changes, pidlist ref is held only between
    cgroup_pidlist_start() and cgroup_pidlist_stop() during which
    cgroup->pidlist_mutex is also held.  IOW, the reference count is
    redundant now.  While in use, it's always one and pidlist_mutex is
    held - holding the mutex has exactly the same protection.
    
    This patch collapses destroy_dwork queueing into cgroup_pidlist_stop()
    so that pidlist_mutex is not released inbetween and drops
    pidlist->use_count.
    
    This patch shouldn't introduce any behavior changes.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarLi Zefan <lizefan@huawei.com>
    04502365
cgroup.c 148 KB