• T
    cgroup: update init_css() into init_and_link_css() · ddfcadab
    Tejun Heo 提交于
    init_css() takes the cgroup the new css belongs to as an argument and
    initializes the new css's ->cgroup and ->parent pointers but doesn't
    acquire the matching reference counts.  After the previous patch,
    create_css() puts init_css() and reference acquisition right next to
    each other.  Let's move reference acquistion into init_css() and
    rename the function to init_and_link_css().  This makes sense and is
    easier to follow.  This makes the root csses to hold a reference on
    cgrp_dfl_root.cgrp, which is harmless.
    Signed-off-by: NTejun Heo <tj@kernel.org>
    Acked-by: NLi Zefan <lizefan@huawei.com>
    ddfcadab
cgroup.c 144.2 KB