dm-crypt: unify io_queue and crypt_queue Unify these two request queues. There is no need to have two queues, one is enough. No encryption operations are done in the queue anyway. Signed-off-by: Mikulas Patocka --- drivers/md/dm-crypt.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) Index: linux-3.2-fast/drivers/md/dm-crypt.c =================================================================== --- linux-3.2-fast.orig/drivers/md/dm-crypt.c 2012-02-18 17:11:15.000000000 +0100 +++ linux-3.2-fast/drivers/md/dm-crypt.c 2012-02-18 17:11:18.000000000 +0100 @@ -127,7 +127,6 @@ struct crypt_config { struct bio_set *bs; struct workqueue_struct *io_queue; - struct workqueue_struct *crypt_queue; unsigned crypt_threads_size; int num_threads_value; /* the value entered in the arguments */ struct task_struct **crypt_threads; @@ -1283,7 +1282,7 @@ static void kcryptd_queue_crypt(struct d struct crypt_config *cc = io->target->private; INIT_WORK(&io->work, kcryptd_crypt); - queue_work(cc->crypt_queue, &io->work); + queue_work(cc->io_queue, &io->work); } /* @@ -1437,8 +1436,6 @@ static void crypt_dtr(struct dm_target * if (cc->io_queue) destroy_workqueue(cc->io_queue); - if (cc->crypt_queue) - destroy_workqueue(cc->crypt_queue); crypt_free_tfms(cc); @@ -1755,15 +1752,6 @@ static int crypt_ctr(struct dm_target *t goto bad; } - cc->crypt_queue = alloc_workqueue("kcryptd", - WQ_NON_REENTRANT| - WQ_MEM_RECLAIM, - 1); - if (!cc->crypt_queue) { - ti->error = "Couldn't create kcryptd queue"; - goto bad; - } - if (num_threads == num_online_cpus()) { for (i = 0; i < NR_CPUS; i++) if (cpu_online(i))