Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332451
b: refs/heads/master
c: 4bd2c1e
h: refs/heads/master
i:
  332449: 01cd4c1
  332447: b87d127
v: v3
  • Loading branch information
Michal Hocko authored and Linus Torvalds committed Oct 9, 2012
1 parent 60906d8 commit c1967b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1939c557b5c3c0e800328e3589ae3d27fdfea29e
refs/heads/master: 4bd2c1ee4b439d926e437a4841e8145230df98c9
11 changes: 3 additions & 8 deletions trunk/mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include <linux/oom.h>
#include "internal.h"
#include <net/sock.h>
#include <net/ip.h>
#include <net/tcp_memcontrol.h>

#include <asm/uaccess.h>
Expand Down Expand Up @@ -326,7 +327,7 @@ struct mem_cgroup {
struct mem_cgroup_stat_cpu nocpu_base;
spinlock_t pcp_counter_lock;

#ifdef CONFIG_INET
#if defined(CONFIG_MEMCG_KMEM) && defined(CONFIG_INET)
struct tcp_memcontrol tcp_mem;
#endif
};
Expand Down Expand Up @@ -412,9 +413,7 @@ struct mem_cgroup *mem_cgroup_from_css(struct cgroup_subsys_state *s)
}

/* Writing them here to avoid exposing memcg's inner layout */
#ifdef CONFIG_MEMCG_KMEM
#include <net/sock.h>
#include <net/ip.h>
#if defined(CONFIG_INET) && defined(CONFIG_MEMCG_KMEM)

static bool mem_cgroup_is_root(struct mem_cgroup *memcg);
void sock_update_memcg(struct sock *sk)
Expand Down Expand Up @@ -461,7 +460,6 @@ void sock_release_memcg(struct sock *sk)
}
}

#ifdef CONFIG_INET
struct cg_proto *tcp_proto_cgroup(struct mem_cgroup *memcg)
{
if (!memcg || mem_cgroup_is_root(memcg))
Expand All @@ -470,10 +468,7 @@ struct cg_proto *tcp_proto_cgroup(struct mem_cgroup *memcg)
return &memcg->tcp_mem.cg_proto;
}
EXPORT_SYMBOL(tcp_proto_cgroup);
#endif /* CONFIG_INET */
#endif /* CONFIG_MEMCG_KMEM */

#if defined(CONFIG_INET) && defined(CONFIG_MEMCG_KMEM)
static void disarm_sock_keys(struct mem_cgroup *memcg)
{
if (!memcg_proto_activated(&memcg->tcp_mem.cg_proto))
Expand Down

0 comments on commit c1967b2

Please sign in to comment.