• Tejun Heo's avatar
    cgroup: use cgroup_kn_lock_live() in other cgroup kernfs methods · e76ecaee
    Tejun Heo authored
    Make __cgroup_procs_write() and cgroup_release_agent_write() use
    cgroup_kn_lock_live() and cgroup_kn_unlock() instead of
    cgroup_lock_live_group().  This puts the operations under both
    cgroup_tree_mutex and cgroup_mutex protection without circular
    dependency from kernfs active protection.  Also, this means that
    cgroup_mutex is no longer nested below kernfs active protection.
    There is no longer any place where the two locks interact.
    
    This leaves cgroup_lock_live_group() without any user.  Removed.
    
    This will help simplifying cgroup locking.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarLi Zefan <lizefan@huawei.com>
    e76ecaee
cgroup.c 144 KB