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 /kernel/cgroup_freezer.c | |
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 'kernel/cgroup_freezer.c')
-rw-r--r-- | kernel/cgroup_freezer.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/kernel/cgroup_freezer.c b/kernel/cgroup_freezer.c index fc0646b78a64..f86e93920b62 100644 --- a/kernel/cgroup_freezer.c +++ b/kernel/cgroup_freezer.c | |||
@@ -128,8 +128,7 @@ struct cgroup_subsys freezer_subsys; | |||
128 | * task->alloc_lock (inside __thaw_task(), prevents race with refrigerator()) | 128 | * task->alloc_lock (inside __thaw_task(), prevents race with refrigerator()) |
129 | * sighand->siglock | 129 | * sighand->siglock |
130 | */ | 130 | */ |
131 | static struct cgroup_subsys_state *freezer_create(struct cgroup_subsys *ss, | 131 | static struct cgroup_subsys_state *freezer_create(struct cgroup *cgroup) |
132 | struct cgroup *cgroup) | ||
133 | { | 132 | { |
134 | struct freezer *freezer; | 133 | struct freezer *freezer; |
135 | 134 | ||
@@ -142,8 +141,7 @@ static struct cgroup_subsys_state *freezer_create(struct cgroup_subsys *ss, | |||
142 | return &freezer->css; | 141 | return &freezer->css; |
143 | } | 142 | } |
144 | 143 | ||
145 | static void freezer_destroy(struct cgroup_subsys *ss, | 144 | static void freezer_destroy(struct cgroup *cgroup) |
146 | struct cgroup *cgroup) | ||
147 | { | 145 | { |
148 | struct freezer *freezer = cgroup_freezer(cgroup); | 146 | struct freezer *freezer = cgroup_freezer(cgroup); |
149 | 147 | ||
@@ -164,8 +162,7 @@ static bool is_task_frozen_enough(struct task_struct *task) | |||
164 | * a write to that file racing against an attach, and hence the | 162 | * a write to that file racing against an attach, and hence the |
165 | * can_attach() result will remain valid until the attach completes. | 163 | * can_attach() result will remain valid until the attach completes. |
166 | */ | 164 | */ |
167 | static int freezer_can_attach(struct cgroup_subsys *ss, | 165 | static int freezer_can_attach(struct cgroup *new_cgroup, |
168 | struct cgroup *new_cgroup, | ||
169 | struct cgroup_taskset *tset) | 166 | struct cgroup_taskset *tset) |
170 | { | 167 | { |
171 | struct freezer *freezer; | 168 | struct freezer *freezer; |
@@ -185,7 +182,7 @@ static int freezer_can_attach(struct cgroup_subsys *ss, | |||
185 | return 0; | 182 | return 0; |
186 | } | 183 | } |
187 | 184 | ||
188 | static void freezer_fork(struct cgroup_subsys *ss, struct task_struct *task) | 185 | static void freezer_fork(struct task_struct *task) |
189 | { | 186 | { |
190 | struct freezer *freezer; | 187 | struct freezer *freezer; |
191 | 188 | ||