cgroup: consolidate cgroup_attach_task() and cgroup_attach_proc()
These two functions share most of the code.
Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 7e818a3..01c48c6 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -693,7 +693,8 @@
struct cgroup_iter *it);
void cgroup_iter_end(struct cgroup *cgrp, struct cgroup_iter *it);
int cgroup_scan_tasks(struct cgroup_scanner *scan);
-int cgroup_attach_task(struct cgroup *, struct task_struct *);
+int cgroup_attach_task(struct cgroup *cgrp, struct task_struct *tsk,
+ bool threadgroup);
int cgroup_attach_task_all(struct task_struct *from, struct task_struct *);
/*