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-01-31 02:30:39.000000000 +0100 +++ linux-3.2-fast/drivers/md/dm-crypt.c 2012-01-31 02:30:41.000000000 +0100 @@ -125,7 +125,6 @@ struct crypt_config { struct bio_set *bs; struct workqueue_struct *io_queue; - struct workqueue_struct *crypt_queue; unsigned crypt_threads_size; struct task_struct **crypt_threads; @@ -1280,7 +1279,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); } /* @@ -1434,8 +1433,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); @@ -1735,15 +1732,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))