mm: use vmalloc_array and vcalloc for array allocations
[linux-block.git] / mm / percpu-stats.c
index c6bd092ff7a35ea91a3f2f8046775115876d5954..dd3590dfc23d2c6012409499e8fd7bfae75a6e8a 100644 (file)
@@ -144,7 +144,7 @@ alloc_buffer:
        spin_unlock_irq(&pcpu_lock);
 
        /* there can be at most this many free and allocated fragments */
-       buffer = vmalloc(array_size(sizeof(int), (2 * max_nr_alloc + 1)));
+       buffer = vmalloc_array(2 * max_nr_alloc + 1, sizeof(int));
        if (!buffer)
                return -ENOMEM;