aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorMatthew Dobson <colpatch@us.ibm.com>2006-03-26 04:37:50 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 11:57:00 -0500
commit93d2341c750cda0df48a6cc67b35fe25f1ec47df (patch)
treef098a3bbfae65ce967591ee94d605c6e6bea21c6 /drivers/md/dm.c
parentfec433aaaae32a02329ad7d71b0f3c91b7525077 (diff)
[PATCH] mempool: use mempool_create_slab_pool()
Modify well over a dozen mempool users to call mempool_create_slab_pool() rather than calling mempool_create() with extra arguments, saving about 30 lines of code and increasing readability. Signed-off-by: Matthew Dobson <colpatch@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 8c82373f7ff3..a64798ef481e 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -823,13 +823,11 @@ static struct mapped_device *alloc_dev(unsigned int minor, int persistent)
823 md->queue->unplug_fn = dm_unplug_all; 823 md->queue->unplug_fn = dm_unplug_all;
824 md->queue->issue_flush_fn = dm_flush_all; 824 md->queue->issue_flush_fn = dm_flush_all;
825 825
826 md->io_pool = mempool_create(MIN_IOS, mempool_alloc_slab, 826 md->io_pool = mempool_create_slab_pool(MIN_IOS, _io_cache);
827 mempool_free_slab, _io_cache);
828 if (!md->io_pool) 827 if (!md->io_pool)
829 goto bad2; 828 goto bad2;
830 829
831 md->tio_pool = mempool_create(MIN_IOS, mempool_alloc_slab, 830 md->tio_pool = mempool_create_slab_pool(MIN_IOS, _tio_cache);
832 mempool_free_slab, _tio_cache);
833 if (!md->tio_pool) 831 if (!md->tio_pool)
834 goto bad3; 832 goto bad3;
835 833