Loading drivers/md/dm-req-crypt.c +16 −29 Original line number Diff line number Diff line Loading @@ -844,21 +844,13 @@ static void req_crypt_dtr(struct dm_target *ti) { DMDEBUG("dm-req-crypt Destructor.\n"); if (req_crypt_queue) { destroy_workqueue(req_crypt_queue); req_crypt_queue = NULL; } if (req_io_pool) { mempool_destroy(req_io_pool); req_io_pool = NULL; } if (req_page_pool) { mempool_destroy(req_page_pool); req_page_pool = NULL; } if (tfm) { crypto_free_ablkcipher(tfm); tfm = NULL; if (req_io_pool) { mempool_destroy(req_io_pool); req_io_pool = NULL; } mutex_lock(&engine_list_mutex); kfree(pfe_eng); Loading @@ -866,6 +858,16 @@ static void req_crypt_dtr(struct dm_target *ti) kfree(fde_eng); fde_eng = NULL; mutex_unlock(&engine_list_mutex); if (tfm) { crypto_free_ablkcipher(tfm); tfm = NULL; } if (req_crypt_queue) { destroy_workqueue(req_crypt_queue); req_crypt_queue = NULL; } dm_put_device(ti, dev); } Loading Loading @@ -1014,24 +1016,9 @@ static int req_crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) } err = 0; ctr_exit: if (err != 0) { if (req_crypt_queue) { destroy_workqueue(req_crypt_queue); req_crypt_queue = NULL; } if (req_io_pool) { mempool_destroy(req_io_pool); req_io_pool = NULL; } if (req_page_pool) { mempool_destroy(req_page_pool); req_page_pool = NULL; } if (tfm) { crypto_free_ablkcipher(tfm); tfm = NULL; } } if (err) req_crypt_dtr(ti); kfree(eng_list); return err; } Loading Loading
drivers/md/dm-req-crypt.c +16 −29 Original line number Diff line number Diff line Loading @@ -844,21 +844,13 @@ static void req_crypt_dtr(struct dm_target *ti) { DMDEBUG("dm-req-crypt Destructor.\n"); if (req_crypt_queue) { destroy_workqueue(req_crypt_queue); req_crypt_queue = NULL; } if (req_io_pool) { mempool_destroy(req_io_pool); req_io_pool = NULL; } if (req_page_pool) { mempool_destroy(req_page_pool); req_page_pool = NULL; } if (tfm) { crypto_free_ablkcipher(tfm); tfm = NULL; if (req_io_pool) { mempool_destroy(req_io_pool); req_io_pool = NULL; } mutex_lock(&engine_list_mutex); kfree(pfe_eng); Loading @@ -866,6 +858,16 @@ static void req_crypt_dtr(struct dm_target *ti) kfree(fde_eng); fde_eng = NULL; mutex_unlock(&engine_list_mutex); if (tfm) { crypto_free_ablkcipher(tfm); tfm = NULL; } if (req_crypt_queue) { destroy_workqueue(req_crypt_queue); req_crypt_queue = NULL; } dm_put_device(ti, dev); } Loading Loading @@ -1014,24 +1016,9 @@ static int req_crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) } err = 0; ctr_exit: if (err != 0) { if (req_crypt_queue) { destroy_workqueue(req_crypt_queue); req_crypt_queue = NULL; } if (req_io_pool) { mempool_destroy(req_io_pool); req_io_pool = NULL; } if (req_page_pool) { mempool_destroy(req_page_pool); req_page_pool = NULL; } if (tfm) { crypto_free_ablkcipher(tfm); tfm = NULL; } } if (err) req_crypt_dtr(ti); kfree(eng_list); return err; } Loading