aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2016-01-14 18:21:17 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-14 19:00:49 -0500
commitbaac50bbc3cdfd184ebf586b1704edbfcee866df (patch)
treeb1b168157c38ef0533d2c8765bb3016d6a495cac /include/net/tcp.h
parente805605c721021879a1469bdae45c6f80bc985f4 (diff)
net: tcp_memcontrol: simplify linkage between socket and page counter
There won't be any separate counters for socket memory consumed by protocols other than TCP in the future. Remove the indirection and link sockets directly to their owning memory cgroup. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> 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>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index d9df80deba31..8ea19977ea53 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -289,8 +289,8 @@ extern int tcp_memory_pressure;
289/* optimized version of sk_under_memory_pressure() for TCP sockets */ 289/* optimized version of sk_under_memory_pressure() for TCP sockets */
290static inline bool tcp_under_memory_pressure(const struct sock *sk) 290static inline bool tcp_under_memory_pressure(const struct sock *sk)
291{ 291{
292 if (mem_cgroup_sockets_enabled && sk->sk_cgrp && 292 if (mem_cgroup_sockets_enabled && sk->sk_memcg &&
293 mem_cgroup_under_socket_pressure(sk->sk_cgrp)) 293 mem_cgroup_under_socket_pressure(sk->sk_memcg))
294 return true; 294 return true;
295 295
296 return tcp_memory_pressure; 296 return tcp_memory_pressure;