summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2013-02-22 07:59:10 +0000
committerDavid S. Miller <davem@davemloft.net>2013-02-22 15:10:19 -0500
commitcbda4eaffa2da9cefb89dd748803da689596d28b (patch)
tree7a95d936a0358dd60adf432af06a15e96cedd071 /net
parent4cfb04854d053e4d6391d7f84495f48082342362 (diff)
sock: only define socket limit if mem cgroup configured
The mem cgroup socket limit is only used if the config option is enabled. Found with sparse Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/sock.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index fe96c5d3429..b261a797774 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -186,8 +186,10 @@ void mem_cgroup_sockets_destroy(struct mem_cgroup *memcg)
static struct lock_class_key af_family_keys[AF_MAX];
static struct lock_class_key af_family_slock_keys[AF_MAX];
+#if defined(CONFIG_MEMCG_KMEM)
struct static_key memcg_socket_limit_enabled;
EXPORT_SYMBOL(memcg_socket_limit_enabled);
+#endif
/*
* Make lock validator output more readable. (we pre-construct these