diff options
Diffstat (limited to 'fs/mbcache.c')
| -rw-r--r-- | fs/mbcache.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/mbcache.c b/fs/mbcache.c index e60a840999aa..19cb8eb6744e 100644 --- a/fs/mbcache.c +++ b/fs/mbcache.c @@ -358,16 +358,15 @@ struct mb_cache *mb_cache_create(int bucket_bits) unsigned long bucket_count = 1UL << bucket_bits; unsigned long i; - cache = kzalloc(sizeof(struct mb_cache), GFP_KERNEL); + cache = kzalloc_obj(struct mb_cache, GFP_KERNEL); if (!cache) goto err_out; cache->c_bucket_bits = 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_array(bucket_count, - sizeof(struct hlist_bl_head), - GFP_KERNEL); + cache->c_hash = kmalloc_objs(struct hlist_bl_head, bucket_count, + GFP_KERNEL); if (!cache->c_hash) { kfree(cache); goto err_out; |
