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>
This commit is contained in:

committed by
Linus Torvalds

parent
baac50bbc3
commit
80e95fe0fd
@@ -1079,13 +1079,6 @@ static inline void sk_refcnt_debug_release(const struct sock *sk)
|
||||
#define sk_refcnt_debug_release(sk) do { } while (0)
|
||||
#endif /* SOCK_REFCNT_DEBUG */
|
||||
|
||||
#if defined(CONFIG_MEMCG_KMEM) && defined(CONFIG_NET)
|
||||
extern struct static_key memcg_socket_limit_enabled;
|
||||
#define mem_cgroup_sockets_enabled static_key_false(&memcg_socket_limit_enabled)
|
||||
#else
|
||||
#define mem_cgroup_sockets_enabled 0
|
||||
#endif
|
||||
|
||||
static inline bool sk_stream_memory_free(const struct sock *sk)
|
||||
{
|
||||
if (sk->sk_wmem_queued >= sk->sk_sndbuf)
|
||||
|
Reference in New Issue
Block a user