diff options
| author | stephen hemminger <[email protected]> | 2013-02-22 07:59:10 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2013-02-22 20:10:19 +0000 |
| commit | cbda4eaffa2da9cefb89dd748803da689596d28b (patch) | |
| tree | 7a95d936a0358dd60adf432af06a15e96cedd071 | |
| parent | net: fix possible deadlock in sum_frag_mem_limit (diff) | |
| download | kernel-cbda4eaffa2da9cefb89dd748803da689596d28b.tar.gz kernel-cbda4eaffa2da9cefb89dd748803da689596d28b.zip | |
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
| -rw-r--r-- | net/core/sock.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index fe96c5d34299..b261a7977746 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 |
