diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2013-10-19 19:26:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-21 18:43:02 -0400 |
commit | 2e685cad57906e19add7189b5ff49dfb6aaa21d3 (patch) | |
tree | d8e382e4e7e0a684284542b6aab8187e18b10a91 /mm/memcontrol.c | |
parent | a4fe34bf902b8f709c635ab37f1f39de0b86cff2 (diff) |
tcp_memcontrol: Kill struct tcp_memcontrol
Replace the pointers in struct cg_proto with actual data fields and kill
struct tcp_memcontrol as it is not fully redundant.
This removes a confusing, unnecessary layer of abstraction.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 1c52ddbc839b..28243f7d9c23 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -311,7 +311,7 @@ struct mem_cgroup { | |||
311 | 311 | ||
312 | atomic_t dead_count; | 312 | atomic_t dead_count; |
313 | #if defined(CONFIG_MEMCG_KMEM) && defined(CONFIG_INET) | 313 | #if defined(CONFIG_MEMCG_KMEM) && defined(CONFIG_INET) |
314 | struct tcp_memcontrol tcp_mem; | 314 | struct cg_proto tcp_mem; |
315 | #endif | 315 | #endif |
316 | #if defined(CONFIG_MEMCG_KMEM) | 316 | #if defined(CONFIG_MEMCG_KMEM) |
317 | /* analogous to slab_common's slab_caches list. per-memcg */ | 317 | /* analogous to slab_common's slab_caches list. per-memcg */ |
@@ -550,13 +550,13 @@ struct cg_proto *tcp_proto_cgroup(struct mem_cgroup *memcg) | |||
550 | if (!memcg || mem_cgroup_is_root(memcg)) | 550 | if (!memcg || mem_cgroup_is_root(memcg)) |
551 | return NULL; | 551 | return NULL; |
552 | 552 | ||
553 | return &memcg->tcp_mem.cg_proto; | 553 | return &memcg->tcp_mem; |
554 | } | 554 | } |
555 | EXPORT_SYMBOL(tcp_proto_cgroup); | 555 | EXPORT_SYMBOL(tcp_proto_cgroup); |
556 | 556 | ||
557 | static void disarm_sock_keys(struct mem_cgroup *memcg) | 557 | static void disarm_sock_keys(struct mem_cgroup *memcg) |
558 | { | 558 | { |
559 | if (!memcg_proto_activated(&memcg->tcp_mem.cg_proto)) | 559 | if (!memcg_proto_activated(&memcg->tcp_mem)) |
560 | return; | 560 | return; |
561 | static_key_slow_dec(&memcg_socket_limit_enabled); | 561 | static_key_slow_dec(&memcg_socket_limit_enabled); |
562 | } | 562 | } |