|
@@ -84,7 +84,7 @@ struct lru_cache *lc_create(const char *name, struct kmem_cache *cache,
|
|
if (e_count > LC_MAX_ACTIVE)
|
|
if (e_count > LC_MAX_ACTIVE)
|
|
return NULL;
|
|
return NULL;
|
|
|
|
|
|
- slot = kzalloc(e_count * sizeof(struct hlist_head*), GFP_KERNEL);
|
|
|
|
|
|
+ slot = kcalloc(e_count, sizeof(struct hlist_head), GFP_KERNEL);
|
|
if (!slot)
|
|
if (!slot)
|
|
goto out_fail;
|
|
goto out_fail;
|
|
element = kzalloc(e_count * sizeof(struct lc_element *), GFP_KERNEL);
|
|
element = kzalloc(e_count * sizeof(struct lc_element *), GFP_KERNEL);
|