]> git.karo-electronics.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>
Thu, 4 Oct 2012 05:03:33 +0000 (15:03 +1000)
commit07486d3872e8cf8dc40d652502245e93fe3cac88
tree34fcdb687b12de199411087dd806ecbbde1f9534
parentef9a0468e868d3fbe0fa0d0fbecaf20d5928025d
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