aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cgroup.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-08-08 20:11:26 -0400
committerTejun Heo <tj@kernel.org>2013-08-08 20:11:26 -0400
commite535837b1dae17b5a2d76ea1bc22ac1a79354624 (patch)
tree38a78ca5676a0987f00b737b36fe18e30947cf62 /include/linux/cgroup.h
parentc59cd3d840b1b0a8f996cbbd9132128dcaabbeb9 (diff)
cgroup: remove struct cgroup_scanner
cgroup_scan_tasks() takes a pointer to struct cgroup_scanner as its sole argument and the only function of that struct is packing the arguments of the function call which are consisted of five fields. It's not too unusual to pack parameters into a struct when the number of arguments gets excessive or the whole set needs to be passed around a lot, but neither holds here making it just weird. Drop struct cgroup_scanner and pass the params directly to cgroup_scan_tasks(). Note that struct cpuset_change_nodemask_arg was added to cpuset.c to pass both ->cs and ->newmems pointer to cpuset_change_nodemask() using single data pointer. This doesn't make any functional differences. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r--include/linux/cgroup.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 0287fccd0f54..8472ed576b64 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -528,15 +528,6 @@ struct cftype_set {
528 struct cftype *cfts; 528 struct cftype *cfts;
529}; 529};
530 530
531struct cgroup_scanner {
532 struct cgroup *cgrp;
533 int (*test_task)(struct task_struct *p, struct cgroup_scanner *scan);
534 void (*process_task)(struct task_struct *p,
535 struct cgroup_scanner *scan);
536 struct ptr_heap *heap;
537 void *data;
538};
539
540/* 531/*
541 * See the comment above CGRP_ROOT_SANE_BEHAVIOR for details. This 532 * See the comment above CGRP_ROOT_SANE_BEHAVIOR for details. This
542 * function can be called as long as @cgrp is accessible. 533 * function can be called as long as @cgrp is accessible.
@@ -899,7 +890,12 @@ struct cgroup_task_iter {
899void cgroup_task_iter_start(struct cgroup *cgrp, struct cgroup_task_iter *it); 890void cgroup_task_iter_start(struct cgroup *cgrp, struct cgroup_task_iter *it);
900struct task_struct *cgroup_task_iter_next(struct cgroup_task_iter *it); 891struct task_struct *cgroup_task_iter_next(struct cgroup_task_iter *it);
901void cgroup_task_iter_end(struct cgroup_task_iter *it); 892void cgroup_task_iter_end(struct cgroup_task_iter *it);
902int cgroup_scan_tasks(struct cgroup_scanner *scan); 893
894int cgroup_scan_tasks(struct cgroup *cgrp,
895 bool (*test)(struct task_struct *, void *),
896 void (*process)(struct task_struct *, void *),
897 void *data, struct ptr_heap *heap);
898
903int cgroup_attach_task_all(struct task_struct *from, struct task_struct *); 899int cgroup_attach_task_all(struct task_struct *from, struct task_struct *);
904int cgroup_transfer_tasks(struct cgroup *to, struct cgroup *from); 900int cgroup_transfer_tasks(struct cgroup *to, struct cgroup *from);
905 901