Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221718
b: refs/heads/master
c: d2e61b8
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and Linus Torvalds committed Nov 12, 2010
1 parent 7da2aff commit f196218
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 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: 1093736b3c34319b8f1825a4423414d9cf397d73
refs/heads/master: d2e61b8dc99fdb36e0fd176e25365f69afda4ff9
16 changes: 9 additions & 7 deletions trunk/mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -4208,15 +4208,17 @@ static struct mem_cgroup *mem_cgroup_alloc(void)

memset(mem, 0, size);
mem->stat = alloc_percpu(struct mem_cgroup_stat_cpu);
if (!mem->stat) {
if (size < PAGE_SIZE)
kfree(mem);
else
vfree(mem);
mem = NULL;
}
if (!mem->stat)
goto out_free;
spin_lock_init(&mem->pcp_counter_lock);
return mem;

out_free:
if (size < PAGE_SIZE)
kfree(mem);
else
vfree(mem);
return NULL;
}

/*
Expand Down

0 comments on commit f196218

Please sign in to comment.