diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 9e8bfdcfe5a4..a07e0fe06207 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -163,7 +163,7 @@ static int ll_dir_filler(void *_hash, struct page *page0) LASSERT(max_pages > 0 && max_pages <= MD_MAX_BRW_PAGES); - page_pool = kzalloc(sizeof(page) * max_pages, GFP_NOFS); + page_pool = kcalloc(max_pages, sizeof(page), GFP_NOFS); if (page_pool) { page_pool[0] = page0; } else { diff --git a/drivers/staging/lustre/lustre/llite/lloop.c b/drivers/staging/lustre/lustre/llite/lloop.c index 264e5ec3fed6..e0f39fec2787 100644 --- a/drivers/staging/lustre/lustre/llite/lloop.c +++ b/drivers/staging/lustre/lustre/llite/lloop.c @@ -793,11 +793,11 @@ static int __init lloop_init(void) if (ll_iocontrol_magic == NULL) goto out_mem1; - loop_dev = kzalloc(max_loop * sizeof(*loop_dev), GFP_KERNEL); + loop_dev = kcalloc(max_loop, sizeof(*loop_dev), GFP_KERNEL); if (!loop_dev) goto out_mem1; - disks = kzalloc(max_loop * sizeof(*disks), GFP_KERNEL); + disks = kcalloc(max_loop, sizeof(*disks), GFP_KERNEL); if (!disks) goto out_mem2;