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 /security/device_cgroup.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 'security/device_cgroup.c')
-rw-r--r-- | security/device_cgroup.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/security/device_cgroup.c b/security/device_cgroup.c index 8b5b5d8612c6..c43a3323feea 100644 --- a/security/device_cgroup.c +++ b/security/device_cgroup.c | |||
@@ -61,8 +61,8 @@ static inline struct dev_cgroup *task_devcgroup(struct task_struct *task) | |||
61 | 61 | ||
62 | struct cgroup_subsys devices_subsys; | 62 | struct cgroup_subsys devices_subsys; |
63 | 63 | ||
64 | static int devcgroup_can_attach(struct cgroup_subsys *ss, | 64 | static int devcgroup_can_attach(struct cgroup *new_cgrp, |
65 | struct cgroup *new_cgrp, struct cgroup_taskset *set) | 65 | struct cgroup_taskset *set) |
66 | { | 66 | { |
67 | struct task_struct *task = cgroup_taskset_first(set); | 67 | struct task_struct *task = cgroup_taskset_first(set); |
68 | 68 | ||
@@ -156,8 +156,7 @@ remove: | |||
156 | /* | 156 | /* |
157 | * called from kernel/cgroup.c with cgroup_lock() held. | 157 | * called from kernel/cgroup.c with cgroup_lock() held. |
158 | */ | 158 | */ |
159 | static struct cgroup_subsys_state *devcgroup_create(struct cgroup_subsys *ss, | 159 | static struct cgroup_subsys_state *devcgroup_create(struct cgroup *cgroup) |
160 | struct cgroup *cgroup) | ||
161 | { | 160 | { |
162 | struct dev_cgroup *dev_cgroup, *parent_dev_cgroup; | 161 | struct dev_cgroup *dev_cgroup, *parent_dev_cgroup; |
163 | struct cgroup *parent_cgroup; | 162 | struct cgroup *parent_cgroup; |
@@ -195,8 +194,7 @@ static struct cgroup_subsys_state *devcgroup_create(struct cgroup_subsys *ss, | |||
195 | return &dev_cgroup->css; | 194 | return &dev_cgroup->css; |
196 | } | 195 | } |
197 | 196 | ||
198 | static void devcgroup_destroy(struct cgroup_subsys *ss, | 197 | static void devcgroup_destroy(struct cgroup *cgroup) |
199 | struct cgroup *cgroup) | ||
200 | { | 198 | { |
201 | struct dev_cgroup *dev_cgroup; | 199 | struct dev_cgroup *dev_cgroup; |
202 | struct dev_whitelist_item *wh, *tmp; | 200 | struct dev_whitelist_item *wh, *tmp; |