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>
This commit is contained in:
@@ -6906,8 +6906,7 @@ unlock:
|
||||
device_initcall(perf_event_sysfs_init);
|
||||
|
||||
#ifdef CONFIG_CGROUP_PERF
|
||||
static struct cgroup_subsys_state *perf_cgroup_create(
|
||||
struct cgroup_subsys *ss, struct cgroup *cont)
|
||||
static struct cgroup_subsys_state *perf_cgroup_create(struct cgroup *cont)
|
||||
{
|
||||
struct perf_cgroup *jc;
|
||||
|
||||
@@ -6924,8 +6923,7 @@ static struct cgroup_subsys_state *perf_cgroup_create(
|
||||
return &jc->css;
|
||||
}
|
||||
|
||||
static void perf_cgroup_destroy(struct cgroup_subsys *ss,
|
||||
struct cgroup *cont)
|
||||
static void perf_cgroup_destroy(struct cgroup *cont)
|
||||
{
|
||||
struct perf_cgroup *jc;
|
||||
jc = container_of(cgroup_subsys_state(cont, perf_subsys_id),
|
||||
@@ -6941,8 +6939,7 @@ static int __perf_cgroup_move(void *info)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void perf_cgroup_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
|
||||
struct cgroup_taskset *tset)
|
||||
static void perf_cgroup_attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
|
||||
{
|
||||
struct task_struct *task;
|
||||
|
||||
@@ -6950,8 +6947,8 @@ static void perf_cgroup_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
|
||||
task_function_call(task, __perf_cgroup_move, task);
|
||||
}
|
||||
|
||||
static void perf_cgroup_exit(struct cgroup_subsys *ss, struct cgroup *cgrp,
|
||||
struct cgroup *old_cgrp, struct task_struct *task)
|
||||
static void perf_cgroup_exit(struct cgroup *cgrp, struct cgroup *old_cgrp,
|
||||
struct task_struct *task)
|
||||
{
|
||||
/*
|
||||
* cgroup_exit() is called in the copy_process() failure path.
|
||||
|
||||
Reference in New Issue
Block a user