diff options
author | Glauber Costa <glommer@parallels.com> | 2012-01-15 17:04:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-17 10:15:45 -0500 |
commit | 319d3b9c97b5e3191e419bb95496bf08ec50f096 (patch) | |
tree | 6e57f4183060aab780d17fe8f6ac11272cc679fc /mm/memcontrol.c | |
parent | 8d9d399f14ea65aeb50c7404e986bceede93bb99 (diff) |
net: move sock_update_memcg outside of CONFIG_INET
Although only used currently for tcp sockets, this function
is now used in common sock code (for sock_clone())
Commit 475f1b52645a29936b9df1d8fcd45f7e56bd4a9f moved the
declaration of sock_update_clone() to inside sock.c, but
this only fixes the problem when CONFIG_CGROUP_MEM_RES_CTLR_KMEM
is also not defined.
This patch here is verified to fix both problems, although
reverting the previous one is not necessary.
Signed-off-by: Glauber Costa <glommer@parallels.com>
CC: David S. Miller <davem@davemloft.net>
CC: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 602207be9853..3dbff4dcde35 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -373,7 +373,6 @@ static void mem_cgroup_put(struct mem_cgroup *memcg); | |||
373 | 373 | ||
374 | /* Writing them here to avoid exposing memcg's inner layout */ | 374 | /* Writing them here to avoid exposing memcg's inner layout */ |
375 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM | 375 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM |
376 | #ifdef CONFIG_INET | ||
377 | #include <net/sock.h> | 376 | #include <net/sock.h> |
378 | #include <net/ip.h> | 377 | #include <net/ip.h> |
379 | 378 | ||
@@ -420,6 +419,7 @@ void sock_release_memcg(struct sock *sk) | |||
420 | } | 419 | } |
421 | } | 420 | } |
422 | 421 | ||
422 | #ifdef CONFIG_INET | ||
423 | struct cg_proto *tcp_proto_cgroup(struct mem_cgroup *memcg) | 423 | struct cg_proto *tcp_proto_cgroup(struct mem_cgroup *memcg) |
424 | { | 424 | { |
425 | if (!memcg || mem_cgroup_is_root(memcg)) | 425 | if (!memcg || mem_cgroup_is_root(memcg)) |