aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-11-18 03:35:56 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-11-18 03:35:56 -0500
commit0421860a5a75b59a76b7a864a172eb090e3d0785 (patch)
treedf22f28abfa4c8bb77d650b674a44e0aedc586be /mm/memcontrol.c
parentcf655c36fad7b6488a56f18ab56f7d608ca6552b (diff)
parent89ba4d12fca24d373e1b10fce498d68157bafaf0 (diff)
Merge branch 'rmobile/ag5' into rmobile-latest
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 9a99cfaf0a19..2efa8ea07ff7 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4208,15 +4208,17 @@ static struct mem_cgroup *mem_cgroup_alloc(void)
4208 4208
4209 memset(mem, 0, size); 4209 memset(mem, 0, size);
4210 mem->stat = alloc_percpu(struct mem_cgroup_stat_cpu); 4210 mem->stat = alloc_percpu(struct mem_cgroup_stat_cpu);
4211 if (!mem->stat) { 4211 if (!mem->stat)
4212 if (size < PAGE_SIZE) 4212 goto out_free;
4213 kfree(mem);
4214 else
4215 vfree(mem);
4216 mem = NULL;
4217 }
4218 spin_lock_init(&mem->pcp_counter_lock); 4213 spin_lock_init(&mem->pcp_counter_lock);
4219 return mem; 4214 return mem;
4215
4216out_free:
4217 if (size < PAGE_SIZE)
4218 kfree(mem);
4219 else
4220 vfree(mem);
4221 return NULL;
4220} 4222}
4221 4223
4222/* 4224/*