]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/btrfs/volumes.c
btrfs: Replace kmalloc with kmalloc_array
[mirror_ubuntu-artful-kernel.git] / fs / btrfs / volumes.c
index 3c16da51348fa28ee1e250d178ca9c06fee95af3..0db63709786291731aa3e465dd20c46830890311 100644 (file)
@@ -4901,7 +4901,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw,
                        num_stripes = map->num_stripes;
                        max_errors = nr_parity_stripes(map);
 
-                       raid_map = kmalloc(sizeof(u64) * num_stripes,
+                       raid_map = kmalloc_array(num_stripes, sizeof(u64),
                                           GFP_NOFS);
                        if (!raid_map) {
                                ret = -ENOMEM;