summaryrefslogtreecommitdiff
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2016-01-15 02:21:20 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-15 03:00:49 +0300
commit80e95fe0fdcde2812c341ad4209d62dc1a7af53b (patch)
treefb9c8890f258373ac33c31ead466083f7ceb78c4 /mm/memcontrol.c
parentbaac50bbc3cdfd184ebf586b1704edbfcee866df (diff)
downloadlinux-80e95fe0fdcde2812c341ad4209d62dc1a7af53b.tar.xz
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 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index eaaa86126277..08ef3d2ca663 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -291,6 +291,9 @@ static inline struct mem_cgroup *mem_cgroup_from_id(unsigned short id)
/* Writing them here to avoid exposing memcg's inner layout */
#if defined(CONFIG_INET) && defined(CONFIG_MEMCG_KMEM)
+struct static_key memcg_sockets_enabled_key;
+EXPORT_SYMBOL(memcg_sockets_enabled_key);
+
void sock_update_memcg(struct sock *sk)
{
struct mem_cgroup *memcg;