Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356571
b: refs/heads/master
c: 6acc8b0
h: refs/heads/master
i:
  356569: 1f484e1
  356567: 8fc864f
v: v3
  • Loading branch information
Michal Hocko authored and Linus Torvalds committed Feb 24, 2013
1 parent 2ea1189 commit 42c5f61
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 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: 2d11085e404f7b45ac4de60db2c9685e349c172d
refs/heads/master: 6acc8b02517d7063b25490b26215834bd2f363c8
30 changes: 12 additions & 18 deletions trunk/mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -6046,18 +6046,6 @@ struct mem_cgroup *parent_mem_cgroup(struct mem_cgroup *memcg)
}
EXPORT_SYMBOL(parent_mem_cgroup);

#ifdef CONFIG_MEMCG_SWAP
static void __init enable_swap_cgroup(void)
{
if (!mem_cgroup_disabled() && really_do_swap_account)
do_swap_account = 1;
}
#else
static void __init enable_swap_cgroup(void)
{
}
#endif

static int mem_cgroup_soft_limit_tree_init(void)
{
struct mem_cgroup_tree_per_node *rtpn;
Expand Down Expand Up @@ -6111,7 +6099,6 @@ mem_cgroup_css_alloc(struct cgroup *cont)
/* root ? */
if (cont->parent == NULL) {
int cpu;
enable_swap_cgroup();
parent = NULL;
if (mem_cgroup_soft_limit_tree_init())
goto free_out;
Expand Down Expand Up @@ -6800,12 +6787,19 @@ __setup("swapaccount=", enable_swap_account);

static void __init memsw_file_init(void)
{
if (really_do_swap_account)
WARN_ON(cgroup_add_cftypes(&mem_cgroup_subsys,
memsw_cgroup_files));
WARN_ON(cgroup_add_cftypes(&mem_cgroup_subsys, memsw_cgroup_files));
}

static void __init enable_swap_cgroup(void)
{
if (!mem_cgroup_disabled() && really_do_swap_account) {
do_swap_account = 1;
memsw_file_init();
}
}

#else
static void __init memsw_file_init(void)
static void __init enable_swap_cgroup(void)
{
}
#endif
Expand All @@ -6819,7 +6813,7 @@ static void __init memsw_file_init(void)
static int __init mem_cgroup_init(void)
{
hotcpu_notifier(memcg_cpu_hotplug_callback, 0);
memsw_file_init();
enable_swap_cgroup();
return 0;
}
subsys_initcall(mem_cgroup_init);

0 comments on commit 42c5f61

Please sign in to comment.