]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/mbcache.c
Merge drm-misc-next-fixes-2019-05-20 into drm-misc-fixes
[linux.git] / fs / mbcache.c
index bf41e2e72c1883b7fba884a8f7006ecc50bcf768..081ccf0caee35966477d8a2b801c19051fd2faf9 100644 (file)
@@ -353,8 +353,9 @@ struct mb_cache *mb_cache_create(int bucket_bits)
        cache->c_max_entries = bucket_count << 4;
        INIT_LIST_HEAD(&cache->c_list);
        spin_lock_init(&cache->c_list_lock);
-       cache->c_hash = kmalloc(bucket_count * sizeof(struct hlist_bl_head),
-                               GFP_KERNEL);
+       cache->c_hash = kmalloc_array(bucket_count,
+                                     sizeof(struct hlist_bl_head),
+                                     GFP_KERNEL);
        if (!cache->c_hash) {
                kfree(cache);
                goto err_out;