[dm-devel] [PATCH 4/7] dm-crypt: remove io_pool

Mike Snitzer snitzer at redhat.com
Fri Feb 13 21:17:20 UTC 2015


On Fri, Feb 13 2015 at  8:25P -0500,
Mikulas Patocka <mpatocka at redhat.com> wrote:

> Remove io_pool and _crypt_io_pool because they are unused.
> 
> Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
> 
> ---
>  drivers/md/dm-crypt.c |   21 +--------------------
>  1 file changed, 1 insertion(+), 20 deletions(-)
> 
> Index: linux-3.18-rc1/drivers/md/dm-crypt.c
> ===================================================================
> --- linux-3.18-rc1.orig/drivers/md/dm-crypt.c	2014-10-21 00:49:34.000000000 +0200
> +++ linux-3.18-rc1/drivers/md/dm-crypt.c	2014-10-21 00:49:37.000000000 +0200
> @@ -1946,14 +1933,9 @@ static int __init dm_crypt_init(void)
>  {
>  	int r;
>  
> -	_crypt_io_pool = KMEM_CACHE(dm_crypt_io, 0);
> -	if (!_crypt_io_pool)
> -		return -ENOMEM;
> -
>  	r = dm_register_target(&crypt_target);
>  	if (r < 0) {
>  		DMERR("register failed %d", r);
> -		kmem_cache_destroy(_crypt_io_pool);
>  	}
>  
>  	return r;

I folded this in:

diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index e6a1460..cb075a7 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -2035,9 +2035,8 @@ static int __init dm_crypt_init(void)
 	int r;
 
 	r = dm_register_target(&crypt_target);
-	if (r < 0) {
+	if (r < 0)
 		DMERR("register failed %d", r);
-	}
 
 	return r;
 }




More information about the dm-devel mailing list