cgroup: implement task_cgroup_path_from_hierarchy()
authorTejun Heo <tj@kernel.org>
Mon, 15 Apr 2013 03:50:08 +0000 (20:50 -0700)
committerTejun Heo <tj@kernel.org>
Tue, 14 May 2013 18:42:07 +0000 (11:42 -0700)
commit857a2beb09ab83e9a8185821ae16db7dfbe8b837
tree2ea1456855d7046dd5503cd7a0a6c78e804aa299
parent1a574231669f8c3065c83974e9557fcbbd94b8a6
cgroup: implement task_cgroup_path_from_hierarchy()

kdbus folks want a sane way to determine the cgroup path that a given
task belongs to on a given hierarchy, which is a reasonble thing to
expect from cgroup core.

Implement task_cgroup_path_from_hierarchy().

v2: Dropped unnecessary NULL check on the return value of
    task_cgroup_from_root() as suggested by Li Zefan.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Greg Kroah-Hartman <greg@kroah.com>
Acked-by: Li Zefan <lizefan@huawei.com>
Cc: Kay Sievers <kay@vrfy.org>
Cc: Lennart Poettering <lennart@poettering.net>
Cc: Daniel Mack <daniel@zonque.org>
include/linux/cgroup.h
kernel/cgroup.c