summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-roccat-common.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-05-14 09:15:01 -0400
committerTejun Heo <tj@kernel.org>2014-05-14 09:15:01 -0400
commit9e4173e1f24fa3bd562f13b92ee34c7dfb1db7c9 (patch)
treee206db91f558760786454780f983c429cb551426 /drivers/hid/hid-roccat-common.h
parentcbc125efada6d8c2555dd35e938694eb9b7cd791 (diff)
downloadblackbird-op-linux-9e4173e1f24fa3bd562f13b92ee34c7dfb1db7c9.tar.gz
blackbird-op-linux-9e4173e1f24fa3bd562f13b92ee34c7dfb1db7c9.zip
cgroup: move check_for_release(parent) call to the end of cgroup_destroy_locked()
Currently, check_for_release() on the parent of a destroyed cgroup is invoked from cgroup_destroy_css_killed(). This is because this is where the destroyed cgroup can be removed from the parent's children list. check_for_release() tests the emptiness of the list directly, so invoking it before removing the cgroup from the list makes it think that the parent still has children even when it no longer does. This patch updates check_for_release() to use cgroup_has_live_children() instead of directly testing ->children emptiness and moves check_for_release(parent) earlier to the end of cgroup_destroy_locked(). As cgroup_has_live_children() ignores cgroups marked DEAD, check_for_release() functions correctly as long as it's called after asserting DEAD. This makes release notification slightly more timely and more importantly enables further simplification of cgroup destruction path. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'drivers/hid/hid-roccat-common.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud