From: Tejun Heo Date: Wed, 12 Feb 2014 14:29:50 +0000 (-0500) Subject: cgroup: remove cgroupfs_root->refcnt X-Git-Tag: next-20140306~19^2~13 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-linux.git;a=commitdiff_plain;h=776f02fa4e1ad70557c0318c70ce928e0642bee0;hp=776f02fa4e1ad70557c0318c70ce928e0642bee0;ds=sidebyside cgroup: remove cgroupfs_root->refcnt Currently, cgroupfs_root and its ->top_cgroup are separated reference counted and the latter's is ignored. There's no reason to do this separately. This patch removes cgroupfs_root->refcnt and destroys cgroupfs_root when the top_cgroup is released. * cgroup_put() updated to ignore cgroup_is_dead() test for top cgroups. cgroup_free_fn() updated to handle root destruction when releasing a top cgroup. * As root destruction is now bounced through cgroup destruction, it is asynchronous. Update cgroup_mount() so that it waits for pending release which is currently implemented using msleep(). Converting this to proper wait_queue isn't hard but likely unnecessary. Signed-off-by: Tejun Heo Acked-by: Li Zefan ---