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