]> 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>
Wed, 26 Sep 2012 05:45:07 +0000 (15:45 +1000)
commit2e243cc6bff7f7b9d7ad481fac87ec6b004611a0
tree53b9acfa5dcd52a5457d9fd8d19ae56e0fe92688
parentec2e5c22ffcec23861fdde919f30ddf6abe7abf9
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