btrfs: Replace kmalloc with kmalloc_array
authorDulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Thu, 31 Oct 2013 05:02:18 +0000 (10:32 +0530)
committerChris Mason <chris.mason@fusionio.com>
Tue, 12 Nov 2013 03:12:22 +0000 (22:12 -0500)
commitd9b0d9ba04cf99abff9125b688c03e154598a644
tree19d5fd9776a761379a89a1f87e452973bd9685a1
parente248e04e7798d234ddbeab6ee6acdec2476fe1a8
btrfs: Replace kmalloc with kmalloc_array

Replace kmalloc(size * nr, ) with kmalloc_array(nr, size), thus making
it easier to check is that the calculation doesn't wrap or return a smaller allocation

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Zach Brown <zab@redhat.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/delayed-inode.c
fs/btrfs/ioctl.c
fs/btrfs/super.c
fs/btrfs/volumes.c