• Tejun Heo's avatar
    cgroup: replace task_cgroup_path_from_hierarchy() with task_cgroup_path() · 913ffdb5
    Tejun Heo authored
    task_cgroup_path_from_hierarchy() was added for the planned new users
    and none of the currently planned users wants to know about multiple
    hierarchies.  This patch drops the multiple hierarchy part and makes
    it always return the path in the first non-dummy hierarchy.
    
    As unified hierarchy will always have id 1, this is guaranteed to
    return the path for the unified hierarchy if mounted; otherwise, it
    will return the path from the hierarchy which happens to occupy the
    lowest hierarchy id, which will usually be the first hierarchy mounted
    after boot.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarLi Zefan <lizefan@huawei.com>
    Cc: Lennart Poettering <lennart@poettering.net>
    Cc: Kay Sievers <kay.sievers@vrfy.org>
    Cc: Jan Kaluža <jkaluza@redhat.com>
    913ffdb5
cgroup.c 152 KB