]> git.karo-electronics.de Git - karo-tx-linux.git/commit
memcg: cleanup kmem tcp ifdefs
authorMichal Hocko <mhocko@suse.cz>
Fri, 21 Sep 2012 01:01:39 +0000 (11:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 25 Sep 2012 08:46:22 +0000 (18:46 +1000)
commitea3c1575ef6d60866a255da7d156d0e71a63e86e
tree4b94ee5b57dc711cda8dd3ec5b127c42e8ae5014
parent268bbfbbd4b6671a9140f53f40ac6813f0f242cf
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