]> git.baikalelectronics.ru Git - kernel.git/commit
net: tcp_memcontrol: protect all tcp_memcontrol calls by jump-label
authorJohannes Weiner <hannes@cmpxchg.org>
Thu, 14 Jan 2016 23:21:05 +0000 (15:21 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Jan 2016 00:00:49 +0000 (16:00 -0800)
commitd2dffac906b8ce9248006ef6d1960db46363a200
treec039825abb7b78cc1cbe3d06e2a2fe481f81f3af
parent8c5243c2e8af48379aa4073de23dd01b223fa1d4
net: tcp_memcontrol: protect all tcp_memcontrol calls by jump-label

Move the jump-label from sock_update_memcg() and sock_release_memcg() to
the callsite, and so eliminate those function calls when socket
accounting is not enabled.

This also eliminates the need for dummy functions because the calls will
be optimized away if the Kconfig options are not enabled.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: David S. Miller <davem@davemloft.net>
Reviewed-by: Vladimir Davydov <vdavydov@virtuozzo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/memcontrol.h
mm/memcontrol.c
net/core/sock.c
net/ipv4/tcp.c
net/ipv4/tcp_ipv4.c