• Tejun Heo's avatar
    cgroup: make cgroup hold onto its kernfs_node · 6f30558f
    Tejun Heo authored
    cgroup currently releases its kernfs_node when it gets removed.  While
    not buggy, this makes cgroup->kn access rules complicated than
    necessary and leads to things like get/put protection around
    kernfs_remove() in cgroup_destroy_locked().  In addition, we want to
    use kernfs_name/path() and friends but also want to be able to
    determine a cgroup's name between removal and release.
    
    This patch makes cgroup hold onto its kernfs_node until freed so that
    cgroup->kn is always accessible.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarLi Zefan <lizefan@huawei.com>
    6f30558f
cgroup.c 132 KB