]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
memcg: cleanup kmem tcp ifdefs
authorMichal Hocko <mhocko@suse.cz>
Fri, 28 Sep 2012 00:19:52 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 8 Oct 2012 03:00:16 +0000 (14:00 +1100)
commit21f50034f15a116512d34a4f8245a5bb4be5f7e2
treea17e51694ad689ae49decf56e75b226d5e7fc731
parent8aefd4f17de8f1a02bd3f6e85a6f5512ac899320
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