aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/events
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2012-01-31 00:47:36 -0500
committerTejun Heo <tj@kernel.org>2012-02-02 12:20:22 -0500
commit761b3ef50e1c2649cffbfa67a4dcb2dcdb7982ed (patch)
tree67ab6a9a2520811c9c0b4d70d1c19b4bfca16237 /kernel/events
parent61d1d219c4c0761059236a46867bc49943c4d29d (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 'kernel/events')
-rw-r--r--kernel/events/core.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index a8f4ac001a00..a5d1ee92b0d9 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6906,8 +6906,7 @@ unlock:
6906device_initcall(perf_event_sysfs_init); 6906device_initcall(perf_event_sysfs_init);
6907 6907
6908#ifdef CONFIG_CGROUP_PERF 6908#ifdef CONFIG_CGROUP_PERF
6909static struct cgroup_subsys_state *perf_cgroup_create( 6909static struct cgroup_subsys_state *perf_cgroup_create(struct cgroup *cont)
6910 struct cgroup_subsys *ss, struct cgroup *cont)
6911{ 6910{
6912 struct perf_cgroup *jc; 6911 struct perf_cgroup *jc;
6913 6912
@@ -6924,8 +6923,7 @@ static struct cgroup_subsys_state *perf_cgroup_create(
6924 return &jc->css; 6923 return &jc->css;
6925} 6924}
6926 6925
6927static void perf_cgroup_destroy(struct cgroup_subsys *ss, 6926static void perf_cgroup_destroy(struct cgroup *cont)
6928 struct cgroup *cont)
6929{ 6927{
6930 struct perf_cgroup *jc; 6928 struct perf_cgroup *jc;
6931 jc = container_of(cgroup_subsys_state(cont, perf_subsys_id), 6929 jc = container_of(cgroup_subsys_state(cont, perf_subsys_id),
@@ -6941,8 +6939,7 @@ static int __perf_cgroup_move(void *info)
6941 return 0; 6939 return 0;
6942} 6940}
6943 6941
6944static void perf_cgroup_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, 6942static void perf_cgroup_attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
6945 struct cgroup_taskset *tset)
6946{ 6943{
6947 struct task_struct *task; 6944 struct task_struct *task;
6948 6945
@@ -6950,8 +6947,8 @@ static void perf_cgroup_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
6950 task_function_call(task, __perf_cgroup_move, task); 6947 task_function_call(task, __perf_cgroup_move, task);
6951} 6948}
6952 6949
6953static void perf_cgroup_exit(struct cgroup_subsys *ss, struct cgroup *cgrp, 6950static void perf_cgroup_exit(struct cgroup *cgrp, struct cgroup *old_cgrp,
6954 struct cgroup *old_cgrp, struct task_struct *task) 6951 struct task_struct *task)
6955{ 6952{
6956 /* 6953 /*
6957 * cgroup_exit() is called in the copy_process() failure path. 6954 * cgroup_exit() is called in the copy_process() failure path.