diff options
Diffstat (limited to 'fs/btrfs/delayed-inode.c')
-rw-r--r-- | fs/btrfs/delayed-inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index 2bb8e1a988a1..8d292fbae659 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c | |||
@@ -770,13 +770,13 @@ static int btrfs_batch_insert_items(struct btrfs_root *root, | |||
770 | */ | 770 | */ |
771 | btrfs_set_path_blocking(path); | 771 | btrfs_set_path_blocking(path); |
772 | 772 | ||
773 | keys = kmalloc(sizeof(struct btrfs_key) * nitems, GFP_NOFS); | 773 | keys = kmalloc_array(nitems, sizeof(struct btrfs_key), GFP_NOFS); |
774 | if (!keys) { | 774 | if (!keys) { |
775 | ret = -ENOMEM; | 775 | ret = -ENOMEM; |
776 | goto out; | 776 | goto out; |
777 | } | 777 | } |
778 | 778 | ||
779 | data_size = kmalloc(sizeof(u32) * nitems, GFP_NOFS); | 779 | data_size = kmalloc_array(nitems, sizeof(u32), GFP_NOFS); |
780 | if (!data_size) { | 780 | if (!data_size) { |
781 | ret = -ENOMEM; | 781 | ret = -ENOMEM; |
782 | goto error; | 782 | goto error; |