summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-07-11 19:34:48 -0400
committerTejun Heo <tj@kernel.org>2013-07-12 15:49:05 -0400
commit913ffdb54366f94eec65c656cae8c6e00e1ab1b0 (patch)
tree55dae8f32f7a0a64ed6b665497e12414fb6d3103 /include
parentadd0c59d802e6118e51e21244c3871be35164e4b (diff)
cgroup: replace task_cgroup_path_from_hierarchy() with task_cgroup_path()
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: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com> Cc: Lennart Poettering <lennart@poettering.net> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Jan Kaluža <jkaluza@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/cgroup.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index fd097ecfcd97..21cfaff7e002 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -540,8 +540,7 @@ int cgroup_rm_cftypes(struct cgroup_subsys *ss, struct cftype *cfts);
540bool cgroup_is_descendant(struct cgroup *cgrp, struct cgroup *ancestor); 540bool cgroup_is_descendant(struct cgroup *cgrp, struct cgroup *ancestor);
541 541
542int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen); 542int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen);
543int task_cgroup_path_from_hierarchy(struct task_struct *task, int hierarchy_id, 543int task_cgroup_path(struct task_struct *task, char *buf, size_t buflen);
544 char *buf, size_t buflen);
545 544
546int cgroup_task_count(const struct cgroup *cgrp); 545int cgroup_task_count(const struct cgroup *cgrp);
547 546