aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_cgroup.c
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 /net/sched/cls_cgroup.c
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 'net/sched/cls_cgroup.c')
-rw-r--r--net/sched/cls_cgroup.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
index f84fdc3a7f27..1afaa284fcd7 100644
--- a/net/sched/cls_cgroup.c
+++ b/net/sched/cls_cgroup.c
@@ -22,9 +22,8 @@
22#include <net/sock.h> 22#include <net/sock.h>
23#include <net/cls_cgroup.h> 23#include <net/cls_cgroup.h>
24 24
25static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss, 25static struct cgroup_subsys_state *cgrp_create(struct cgroup *cgrp);
26 struct cgroup *cgrp); 26static void cgrp_destroy(struct cgroup *cgrp);
27static void cgrp_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp);
28static int cgrp_populate(struct cgroup_subsys *ss, struct cgroup *cgrp); 27static int cgrp_populate(struct cgroup_subsys *ss, struct cgroup *cgrp);
29 28
30struct cgroup_subsys net_cls_subsys = { 29struct cgroup_subsys net_cls_subsys = {
@@ -51,8 +50,7 @@ static inline struct cgroup_cls_state *task_cls_state(struct task_struct *p)
51 struct cgroup_cls_state, css); 50 struct cgroup_cls_state, css);
52} 51}
53 52
54static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss, 53static struct cgroup_subsys_state *cgrp_create(struct cgroup *cgrp)
55 struct cgroup *cgrp)
56{ 54{
57 struct cgroup_cls_state *cs; 55 struct cgroup_cls_state *cs;
58 56
@@ -66,7 +64,7 @@ static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss,
66 return &cs->css; 64 return &cs->css;
67} 65}
68 66
69static void cgrp_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp) 67static void cgrp_destroy(struct cgroup *cgrp)
70{ 68{
71 kfree(cgrp_cls_state(cgrp)); 69 kfree(cgrp_cls_state(cgrp));
72} 70}