]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blobdiff - fs/jfs/jfs_dmap.c
treewide: kmalloc() -> kmalloc_array()
[mirror_ubuntu-eoan-kernel.git] / fs / jfs / jfs_dmap.c
index 2d514c7affc2ab9382fa812bc173874f3b58b8e9..49263e220dbcf3add3b1cd624a1b8709af955c8e 100644 (file)
@@ -1641,7 +1641,7 @@ s64 dbDiscardAG(struct inode *ip, int agno, s64 minlen)
        max_ranges = nblocks;
        do_div(max_ranges, minlen);
        range_cnt = min_t(u64, max_ranges + 1, 32 * 1024);
-       totrim = kmalloc(sizeof(struct range2trim) * range_cnt, GFP_NOFS);
+       totrim = kmalloc_array(range_cnt, sizeof(struct range2trim), GFP_NOFS);
        if (totrim == NULL) {
                jfs_error(bmp->db_ipbmap->i_sb, "no memory for trim array\n");
                IWRITE_UNLOCK(ipbmap);