]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
cgroup: remove cgroup_pidlist->use_count
authorTejun Heo <tj@kernel.org>
Fri, 29 Nov 2013 15:42:59 +0000 (10:42 -0500)
committerTejun Heo <tj@kernel.org>
Fri, 29 Nov 2013 15:42:59 +0000 (10:42 -0500)
commit045023658ca1e30dc0bb1f148b42c95b740d3e02
treea97199b0e773e5dd5e420987f96f285644586db2
parent4bac00d16a8760eae7205e41d2c246477d42a210
cgroup: remove cgroup_pidlist->use_count

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: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
kernel/cgroup.c