1
0
Fork 0

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>
hifive-unleashed-5.1
stephen hemminger 2013-02-22 07:59:10 +00:00 committed by David S. Miller
parent 4cfb04854d
commit cbda4eaffa
1 changed files with 2 additions and 0 deletions

View File

@ -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