diff options
author | Jun'ichi Nomura <j-nomura@ce.jp.nec.com> | 2013-03-01 17:45:48 -0500 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2013-03-01 17:45:48 -0500 |
commit | 23e5083b4d47e778bf7983329989dab7543def14 (patch) | |
tree | 2df0c48d02a4af159cbbe08231a26d94143cc809 /drivers/md | |
parent | 87eb5b21d92a92ac2da3163039d62df88c2b8422 (diff) |
dm: remove unused _rq_bio_info_cache
Remove _rq_bio_info_cache, which is no longer used.
No functional changes.
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm.c | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 1016c14c28a0..031f1f1c711b 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -205,12 +205,6 @@ struct dm_md_mempools { | |||
205 | static struct kmem_cache *_io_cache; | 205 | static struct kmem_cache *_io_cache; |
206 | static struct kmem_cache *_rq_tio_cache; | 206 | static struct kmem_cache *_rq_tio_cache; |
207 | 207 | ||
208 | /* | ||
209 | * Unused now, and needs to be deleted. But since io_pool is overloaded and it's | ||
210 | * still used for _io_cache, I'm leaving this for a later cleanup | ||
211 | */ | ||
212 | static struct kmem_cache *_rq_bio_info_cache; | ||
213 | |||
214 | static int __init local_init(void) | 208 | static int __init local_init(void) |
215 | { | 209 | { |
216 | int r = -ENOMEM; | 210 | int r = -ENOMEM; |
@@ -224,13 +218,9 @@ static int __init local_init(void) | |||
224 | if (!_rq_tio_cache) | 218 | if (!_rq_tio_cache) |
225 | goto out_free_io_cache; | 219 | goto out_free_io_cache; |
226 | 220 | ||
227 | _rq_bio_info_cache = KMEM_CACHE(dm_rq_clone_bio_info, 0); | ||
228 | if (!_rq_bio_info_cache) | ||
229 | goto out_free_rq_tio_cache; | ||
230 | |||
231 | r = dm_uevent_init(); | 221 | r = dm_uevent_init(); |
232 | if (r) | 222 | if (r) |
233 | goto out_free_rq_bio_info_cache; | 223 | goto out_free_rq_tio_cache; |
234 | 224 | ||
235 | _major = major; | 225 | _major = major; |
236 | r = register_blkdev(_major, _name); | 226 | r = register_blkdev(_major, _name); |
@@ -244,8 +234,6 @@ static int __init local_init(void) | |||
244 | 234 | ||
245 | out_uevent_exit: | 235 | out_uevent_exit: |
246 | dm_uevent_exit(); | 236 | dm_uevent_exit(); |
247 | out_free_rq_bio_info_cache: | ||
248 | kmem_cache_destroy(_rq_bio_info_cache); | ||
249 | out_free_rq_tio_cache: | 237 | out_free_rq_tio_cache: |
250 | kmem_cache_destroy(_rq_tio_cache); | 238 | kmem_cache_destroy(_rq_tio_cache); |
251 | out_free_io_cache: | 239 | out_free_io_cache: |
@@ -256,7 +244,6 @@ out_free_io_cache: | |||
256 | 244 | ||
257 | static void local_exit(void) | 245 | static void local_exit(void) |
258 | { | 246 | { |
259 | kmem_cache_destroy(_rq_bio_info_cache); | ||
260 | kmem_cache_destroy(_rq_tio_cache); | 247 | kmem_cache_destroy(_rq_tio_cache); |
261 | kmem_cache_destroy(_io_cache); | 248 | kmem_cache_destroy(_io_cache); |
262 | unregister_blkdev(_major, _name); | 249 | unregister_blkdev(_major, _name); |
@@ -1986,7 +1973,7 @@ static void __bind_mempools(struct mapped_device *md, struct dm_table *t) | |||
1986 | { | 1973 | { |
1987 | struct dm_md_mempools *p = dm_table_get_md_mempools(t); | 1974 | struct dm_md_mempools *p = dm_table_get_md_mempools(t); |
1988 | 1975 | ||
1989 | if (md->io_pool && md->bs) { | 1976 | if (md->bs) { |
1990 | /* The md already has necessary mempools. */ | 1977 | /* The md already has necessary mempools. */ |
1991 | if (dm_table_get_type(t) == DM_TYPE_BIO_BASED) { | 1978 | if (dm_table_get_type(t) == DM_TYPE_BIO_BASED) { |
1992 | /* | 1979 | /* |
@@ -2780,11 +2767,12 @@ struct dm_md_mempools *dm_alloc_md_mempools(unsigned type, unsigned integrity, u | |||
2780 | 2767 | ||
2781 | per_bio_data_size = roundup(per_bio_data_size, __alignof__(struct dm_target_io)); | 2768 | per_bio_data_size = roundup(per_bio_data_size, __alignof__(struct dm_target_io)); |
2782 | 2769 | ||
2783 | pools->io_pool = (type == DM_TYPE_BIO_BASED) ? | 2770 | pools->io_pool = NULL; |
2784 | mempool_create_slab_pool(MIN_IOS, _io_cache) : | 2771 | if (type == DM_TYPE_BIO_BASED) { |
2785 | mempool_create_slab_pool(MIN_IOS, _rq_bio_info_cache); | 2772 | pools->io_pool = mempool_create_slab_pool(MIN_IOS, _io_cache); |
2786 | if (!pools->io_pool) | 2773 | if (!pools->io_pool) |
2787 | goto free_pools_and_out; | 2774 | goto free_pools_and_out; |
2775 | } | ||
2788 | 2776 | ||
2789 | pools->tio_pool = NULL; | 2777 | pools->tio_pool = NULL; |
2790 | if (type == DM_TYPE_REQUEST_BASED) { | 2778 | if (type == DM_TYPE_REQUEST_BASED) { |
@@ -2814,7 +2802,8 @@ free_tio_pool_and_out: | |||
2814 | mempool_destroy(pools->tio_pool); | 2802 | mempool_destroy(pools->tio_pool); |
2815 | 2803 | ||
2816 | free_io_pool_and_out: | 2804 | free_io_pool_and_out: |
2817 | mempool_destroy(pools->io_pool); | 2805 | if (pools->io_pool) |
2806 | mempool_destroy(pools->io_pool); | ||
2818 | 2807 | ||
2819 | free_pools_and_out: | 2808 | free_pools_and_out: |
2820 | kfree(pools); | 2809 | kfree(pools); |