]> git.karo-electronics.de Git - karo-tx-linux.git/commit
memcg: cleanup kmem tcp ifdefs
authorMichal Hocko <mhocko@suse.cz>
Wed, 26 Sep 2012 01:33:55 +0000 (11:33 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 27 Sep 2012 07:26:59 +0000 (17:26 +1000)
commiteba53b31b2954e9d3c62942ef007a57eb3832e8c
tree8366e1a44f3115af712ab9348579d90dc099010b
parent0b8ba0ba2849231df34c04d29530f6fc3d20c923
memcg: cleanup kmem tcp ifdefs

TCP kmem accounting is currently guarded by CONFIG_MEMCG_KMEM ifdefs but
the code is not used if !CONFIG_INET so we should rather test for both.
The same applies to net/sock.h, net/ip.h and net/tcp_memcontrol.h but
let's keep those outside of any ifdefs because it is considered safer wrt.
 future maintainability.

Tested with
- CONFIG_INET && CONFIG_MEMCG_KMEM
- !CONFIG_INET && CONFIG_MEMCG_KMEM
- CONFIG_INET && !CONFIG_MEMCG_KMEM
- !CONFIG_INET && !CONFIG_MEMCG_KMEM

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Michal Hocko <mhocko@suse.cz>
Cc: Glauber Costa <glommer@parallels.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c