diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2012-01-31 00:47:36 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-02-02 12:20:22 -0500 |
commit | 761b3ef50e1c2649cffbfa67a4dcb2dcdb7982ed (patch) | |
tree | 67ab6a9a2520811c9c0b4d70d1c19b4bfca16237 /include/linux/cgroup.h | |
parent | 61d1d219c4c0761059236a46867bc49943c4d29d (diff) |
cgroup: remove cgroup_subsys argument from callbacks
The argument is not used at all, and it's not necessary, because
a specific callback handler of course knows which subsys it
belongs to.
Now only ->pupulate() takes this argument, because the handlers of
this callback always call cgroup_add_file()/cgroup_add_files().
So we reduce a few lines of code, though the shrinking of object size
is minimal.
16 files changed, 113 insertions(+), 162 deletions(-)
text data bss dec hex filename
5486240 656987 7039960 13183187 c928d3 vmlinux.o.orig
5486170 656987 7039960 13183117 c9288d vmlinux.o
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r-- | include/linux/cgroup.h | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 7da3e745b74c..501adb1b2f43 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -452,23 +452,18 @@ int cgroup_taskset_size(struct cgroup_taskset *tset); | |||
452 | */ | 452 | */ |
453 | 453 | ||
454 | struct cgroup_subsys { | 454 | struct cgroup_subsys { |
455 | struct cgroup_subsys_state *(*create)(struct cgroup_subsys *ss, | 455 | struct cgroup_subsys_state *(*create)(struct cgroup *cgrp); |
456 | struct cgroup *cgrp); | 456 | int (*pre_destroy)(struct cgroup *cgrp); |
457 | int (*pre_destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); | 457 | void (*destroy)(struct cgroup *cgrp); |
458 | void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); | 458 | int (*can_attach)(struct cgroup *cgrp, struct cgroup_taskset *tset); |
459 | int (*can_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 459 | void (*cancel_attach)(struct cgroup *cgrp, struct cgroup_taskset *tset); |
460 | struct cgroup_taskset *tset); | 460 | void (*attach)(struct cgroup *cgrp, struct cgroup_taskset *tset); |
461 | void (*cancel_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 461 | void (*fork)(struct task_struct *task); |
462 | struct cgroup_taskset *tset); | 462 | void (*exit)(struct cgroup *cgrp, struct cgroup *old_cgrp, |
463 | void (*attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 463 | struct task_struct *task); |
464 | struct cgroup_taskset *tset); | 464 | int (*populate)(struct cgroup_subsys *ss, struct cgroup *cgrp); |
465 | void (*fork)(struct cgroup_subsys *ss, struct task_struct *task); | 465 | void (*post_clone)(struct cgroup *cgrp); |
466 | void (*exit)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 466 | void (*bind)(struct cgroup *root); |
467 | struct cgroup *old_cgrp, struct task_struct *task); | ||
468 | int (*populate)(struct cgroup_subsys *ss, | ||
469 | struct cgroup *cgrp); | ||
470 | void (*post_clone)(struct cgroup_subsys *ss, struct cgroup *cgrp); | ||
471 | void (*bind)(struct cgroup_subsys *ss, struct cgroup *root); | ||
472 | 467 | ||
473 | int subsys_id; | 468 | int subsys_id; |
474 | int active; | 469 | int active; |