aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cgroup.h
diff options
context:
space:
mode:
authorYosry Ahmed <yosryahmed@google.com>2022-10-11 00:33:58 +0000
committerTejun Heo <tj@kernel.org>2022-10-11 06:50:03 -1000
commita6d1ce5951185ee91bbe6909fe2758f3625561b0 (patch)
tree450d6875a29897cf85154d2f4ca9dffc55753006 /include/linux/cgroup.h
parentRevert "cgroup: enable cgroup_get_from_file() on cgroup1" (diff)
downloadlinux-dev-a6d1ce5951185ee91bbe6909fe2758f3625561b0.tar.xz
linux-dev-a6d1ce5951185ee91bbe6909fe2758f3625561b0.zip
cgroup: add cgroup_v1v2_get_from_[fd/file]()
Add cgroup_v1v2_get_from_fd() and cgroup_v1v2_get_from_file() that support both cgroup1 and cgroup2. Signed-off-by: Yosry Ahmed <yosryahmed@google.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r--include/linux/cgroup.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 398f0bce7c21..a88de5bdeaa9 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -106,6 +106,7 @@ struct cgroup_subsys_state *css_tryget_online_from_dir(struct dentry *dentry,
struct cgroup *cgroup_get_from_path(const char *path);
struct cgroup *cgroup_get_from_fd(int fd);
+struct cgroup *cgroup_v1v2_get_from_fd(int fd);
int cgroup_attach_task_all(struct task_struct *from, struct task_struct *);
int cgroup_transfer_tasks(struct cgroup *to, struct cgroup *from);