68d0d67
Bugzilla: 993744
68d0d67
Upstream-status: ??
68d0d67
2d33000
diff --git a/drivers/md/dm-cache-policy-mq.c b/drivers/md/dm-cache-policy-mq.c
ec0fd9d
index 416b7b7..9105771 100644
2d33000
--- a/drivers/md/dm-cache-policy-mq.c
2d33000
+++ b/drivers/md/dm-cache-policy-mq.c
ec0fd9d
@@ -866,7 +866,7 @@ static void mq_destroy(struct dm_cache_policy *p)
ec0fd9d
 {
2d33000
 	struct mq_policy *mq = to_mq_policy(p);
2d33000
 
2d33000
-	kfree(mq->table);
2d33000
+	vfree(mq->table);
ec0fd9d
 	epool_exit(&mq->cache_pool);
ec0fd9d
 	epool_exit(&mq->pre_cache_pool);
2d33000
 	kfree(mq);
ec0fd9d
@@ -1221,7 +1221,7 @@ static struct dm_cache_policy *mq_create(dm_cblock_t cache_size,
2d33000
 
2d33000
 	mq->nr_buckets = next_power(from_cblock(cache_size) / 2, 16);
2d33000
 	mq->hash_bits = ffs(mq->nr_buckets) - 1;
2d33000
-	mq->table = kzalloc(sizeof(*mq->table) * mq->nr_buckets, GFP_KERNEL);
2d33000
+	mq->table = vzalloc(sizeof(*mq->table) * mq->nr_buckets);
2d33000
 	if (!mq->table)
2d33000
 		goto bad_alloc_table;
2d33000