aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2016-01-14 18:21:20 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-14 19:00:49 -0500
commit80e95fe0fdcde2812c341ad4209d62dc1a7af53b (patch)
treefb9c8890f258373ac33c31ead466083f7ceb78c4 /net
parentbaac50bbc3cdfd184ebf586b1704edbfcee866df (diff)
mm: memcontrol: generalize the socket accounting jump label
The unified hierarchy memory controller is going to use this jump label as well to control the networking callbacks. Move it to the memory controller code and give it a more generic name. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Michal Hocko <mhocko@suse.com> Reviewed-by: Vladimir Davydov <vdavydov@virtuozzo.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/core/sock.c5
-rw-r--r--net/ipv4/tcp_memcontrol.c4
2 files changed, 2 insertions, 7 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 3535bffa45f3..6c1c8bc93412 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -202,11 +202,6 @@ EXPORT_SYMBOL(sk_net_capable);
202static struct lock_class_key af_family_keys[AF_MAX]; 202static struct lock_class_key af_family_keys[AF_MAX];
203static struct lock_class_key af_family_slock_keys[AF_MAX]; 203static struct lock_class_key af_family_slock_keys[AF_MAX];
204 204
205#if defined(CONFIG_MEMCG_KMEM)
206struct static_key memcg_socket_limit_enabled;
207EXPORT_SYMBOL(memcg_socket_limit_enabled);
208#endif
209
210/* 205/*
211 * Make lock validator output more readable. (we pre-construct these 206 * Make lock validator output more readable. (we pre-construct these
212 * strings build-time, so that runtime initialization of socket 207 * strings build-time, so that runtime initialization of socket
diff --git a/net/ipv4/tcp_memcontrol.c b/net/ipv4/tcp_memcontrol.c
index e5078259cbe3..9a22e2dfd64a 100644
--- a/net/ipv4/tcp_memcontrol.c
+++ b/net/ipv4/tcp_memcontrol.c
@@ -34,7 +34,7 @@ void tcp_destroy_cgroup(struct mem_cgroup *memcg)
34 return; 34 return;
35 35
36 if (memcg->tcp_mem.active) 36 if (memcg->tcp_mem.active)
37 static_key_slow_dec(&memcg_socket_limit_enabled); 37 static_key_slow_dec(&memcg_sockets_enabled_key);
38} 38}
39 39
40static int tcp_update_limit(struct mem_cgroup *memcg, unsigned long nr_pages) 40static int tcp_update_limit(struct mem_cgroup *memcg, unsigned long nr_pages)
@@ -65,7 +65,7 @@ static int tcp_update_limit(struct mem_cgroup *memcg, unsigned long nr_pages)
65 * because when this value change, the code to process it is not 65 * because when this value change, the code to process it is not
66 * patched in yet. 66 * patched in yet.
67 */ 67 */
68 static_key_slow_inc(&memcg_socket_limit_enabled); 68 static_key_slow_inc(&memcg_sockets_enabled_key);
69 memcg->tcp_mem.active = true; 69 memcg->tcp_mem.active = true;
70 } 70 }
71 71