提交 cbda4eaf 编写于 作者: S stephen hemminger 提交者: David S. Miller

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: NStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4cfb0485
...@@ -186,8 +186,10 @@ void mem_cgroup_sockets_destroy(struct mem_cgroup *memcg) ...@@ -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_keys[AF_MAX];
static struct lock_class_key af_family_slock_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; struct static_key memcg_socket_limit_enabled;
EXPORT_SYMBOL(memcg_socket_limit_enabled); EXPORT_SYMBOL(memcg_socket_limit_enabled);
#endif
/* /*
* Make lock validator output more readable. (we pre-construct these * Make lock validator output more readable. (we pre-construct these
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册