summaryrefslogtreecommitdiffstats
path: root/mm/percpu-vm.c
diff options
context:
space:
mode:
authorBob Liu <lliubbo@gmail.com>2011-08-04 11:02:33 +0200
committerTejun Heo <tj@kernel.org>2011-11-22 08:09:41 -0800
commit90459ce06f410b983540be56209c0abcbce23944 (patch)
treede385624ae9bf2dc3c5bf0f54d97ac7db5241108 /mm/percpu-vm.c
parentf8f5ed7c996ad9426847ce09b828d415cb19bc06 (diff)
downloadlinux-stable-90459ce06f410b983540be56209c0abcbce23944.tar.gz
linux-stable-90459ce06f410b983540be56209c0abcbce23944.tar.bz2
linux-stable-90459ce06f410b983540be56209c0abcbce23944.zip
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.c5
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,
if (!pages || !bitmap) {
if (may_alloc && !pages)
- pages = pcpu_mem_alloc(pages_size);
+ pages = pcpu_mem_zalloc(pages_size);
if (may_alloc && !bitmap)
- bitmap = pcpu_mem_alloc(bitmap_size);
+ bitmap = pcpu_mem_zalloc(bitmap_size);
if (!pages || !bitmap)
return NULL;
}
- memset(pages, 0, pages_size);
bitmap_copy(bitmap, chunk->populated, pcpu_unit_pages);
*bitmapp = bitmap;