diff options
author | Bob Liu <lliubbo@gmail.com> | 2011-08-04 05:02:33 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-11-22 11:09:41 -0500 |
commit | 90459ce06f410b983540be56209c0abcbce23944 (patch) | |
tree | de385624ae9bf2dc3c5bf0f54d97ac7db5241108 /mm/percpu-vm.c | |
parent | f8f5ed7c996ad9426847ce09b828d415cb19bc06 (diff) |
percpu: rename pcpu_mem_alloc to pcpu_mem_zalloc
Currently pcpu_mem_alloc() is implemented always return zeroed memory.
So rename it to make user like pcpu_get_pages_and_bitmap() know don't
reinit it.
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'mm/percpu-vm.c')
-rw-r--r-- | mm/percpu-vm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/percpu-vm.c b/mm/percpu-vm.c index ea534960a04b..29e3730d2ffd 100644 --- a/mm/percpu-vm.c +++ b/mm/percpu-vm.c | |||
@@ -50,14 +50,13 @@ static struct page **pcpu_get_pages_and_bitmap(struct pcpu_chunk *chunk, | |||
50 | 50 | ||
51 | if (!pages || !bitmap) { | 51 | if (!pages || !bitmap) { |
52 | if (may_alloc && !pages) | 52 | if (may_alloc && !pages) |
53 | pages = pcpu_mem_alloc(pages_size); | 53 | pages = pcpu_mem_zalloc(pages_size); |
54 | if (may_alloc && !bitmap) | 54 | if (may_alloc && !bitmap) |
55 | bitmap = pcpu_mem_alloc(bitmap_size); | 55 | bitmap = pcpu_mem_zalloc(bitmap_size); |
56 | if (!pages || !bitmap) | 56 | if (!pages || !bitmap) |
57 | return NULL; | 57 | return NULL; |
58 | } | 58 | } |
59 | 59 | ||
60 | memset(pages, 0, pages_size); | ||
61 | bitmap_copy(bitmap, chunk->populated, pcpu_unit_pages); | 60 | bitmap_copy(bitmap, chunk->populated, pcpu_unit_pages); |
62 | 61 | ||
63 | *bitmapp = bitmap; | 62 | *bitmapp = bitmap; |