aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-05-28 13:36:24 -0400
committerJiri Kosina <jkosina@suse.cz>2011-09-15 07:55:02 -0400
commit57f3224c3f838844cdae5e4a9d63e03152013f9a (patch)
tree58b0195a271b810144f375f32f76755c1d44b6cb /drivers/block/drbd
parent3a816054fcd345d0fe47c666c375d372c6170371 (diff)
drbd: Convert vmalloc/memset to vzalloc
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r--drivers/block/drbd/drbd_bitmap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c
index 7b976296b564..912f585a760f 100644
--- a/drivers/block/drbd/drbd_bitmap.c
+++ b/drivers/block/drbd/drbd_bitmap.c
@@ -378,15 +378,14 @@ static struct page **bm_realloc_pages(struct drbd_bitmap *b, unsigned long want)
378 * thread. As we have no disk yet, we are not in the IO path, 378 * thread. As we have no disk yet, we are not in the IO path,
379 * not even the IO path of the peer. */ 379 * not even the IO path of the peer. */
380 bytes = sizeof(struct page *)*want; 380 bytes = sizeof(struct page *)*want;
381 new_pages = kmalloc(bytes, GFP_KERNEL); 381 new_pages = kzalloc(bytes, GFP_KERNEL);
382 if (!new_pages) { 382 if (!new_pages) {
383 new_pages = vmalloc(bytes); 383 new_pages = vzalloc(bytes);
384 if (!new_pages) 384 if (!new_pages)
385 return NULL; 385 return NULL;
386 vmalloced = 1; 386 vmalloced = 1;
387 } 387 }
388 388
389 memset(new_pages, 0, bytes);
390 if (want >= have) { 389 if (want >= have) {
391 for (i = 0; i < have; i++) 390 for (i = 0; i < have; i++)
392 new_pages[i] = old_pages[i]; 391 new_pages[i] = old_pages[i];