aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
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 /include/net
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 'include/net')
-rw-r--r--include/net/sock.h7
-rw-r--r--include/net/tcp_memcontrol.h2
2 files changed, 4 insertions, 5 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index bb972d254dff..705d1add19a1 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -68,7 +68,7 @@ struct cgroup;
68struct cgroup_subsys; 68struct cgroup_subsys;
69#ifdef CONFIG_NET 69#ifdef CONFIG_NET
70int mem_cgroup_sockets_init(struct cgroup *cgrp, struct cgroup_subsys *ss); 70int mem_cgroup_sockets_init(struct cgroup *cgrp, struct cgroup_subsys *ss);
71void mem_cgroup_sockets_destroy(struct cgroup *cgrp, struct cgroup_subsys *ss); 71void mem_cgroup_sockets_destroy(struct cgroup *cgrp);
72#else 72#else
73static inline 73static inline
74int mem_cgroup_sockets_init(struct cgroup *cgrp, struct cgroup_subsys *ss) 74int mem_cgroup_sockets_init(struct cgroup *cgrp, struct cgroup_subsys *ss)
@@ -76,7 +76,7 @@ int mem_cgroup_sockets_init(struct cgroup *cgrp, struct cgroup_subsys *ss)
76 return 0; 76 return 0;
77} 77}
78static inline 78static inline
79void mem_cgroup_sockets_destroy(struct cgroup *cgrp, struct cgroup_subsys *ss) 79void mem_cgroup_sockets_destroy(struct cgroup *cgrp)
80{ 80{
81} 81}
82#endif 82#endif
@@ -869,8 +869,7 @@ struct proto {
869 */ 869 */
870 int (*init_cgroup)(struct cgroup *cgrp, 870 int (*init_cgroup)(struct cgroup *cgrp,
871 struct cgroup_subsys *ss); 871 struct cgroup_subsys *ss);
872 void (*destroy_cgroup)(struct cgroup *cgrp, 872 void (*destroy_cgroup)(struct cgroup *cgrp);
873 struct cgroup_subsys *ss);
874 struct cg_proto *(*proto_cgroup)(struct mem_cgroup *memcg); 873 struct cg_proto *(*proto_cgroup)(struct mem_cgroup *memcg);
875#endif 874#endif
876}; 875};
diff --git a/include/net/tcp_memcontrol.h b/include/net/tcp_memcontrol.h
index 3512082fa909..48410ff25c9e 100644
--- a/include/net/tcp_memcontrol.h
+++ b/include/net/tcp_memcontrol.h
@@ -13,7 +13,7 @@ struct tcp_memcontrol {
13 13
14struct cg_proto *tcp_proto_cgroup(struct mem_cgroup *memcg); 14struct cg_proto *tcp_proto_cgroup(struct mem_cgroup *memcg);
15int tcp_init_cgroup(struct cgroup *cgrp, struct cgroup_subsys *ss); 15int tcp_init_cgroup(struct cgroup *cgrp, struct cgroup_subsys *ss);
16void tcp_destroy_cgroup(struct cgroup *cgrp, struct cgroup_subsys *ss); 16void tcp_destroy_cgroup(struct cgroup *cgrp);
17unsigned long long tcp_max_memory(const struct mem_cgroup *memcg); 17unsigned long long tcp_max_memory(const struct mem_cgroup *memcg);
18void tcp_prot_mem(struct mem_cgroup *memcg, long val, int idx); 18void tcp_prot_mem(struct mem_cgroup *memcg, long val, int idx);
19#endif /* _TCP_MEMCG_H */ 19#endif /* _TCP_MEMCG_H */