• T
    cgroup: remove cgroupfs_root->refcnt · 776f02fa
    Tejun Heo 提交于
    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: NTejun Heo <tj@kernel.org>
    Acked-by: NLi Zefan <lizefan@huawei.com>
    776f02fa
cgroup.h 25.5 KB