summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-crypt.c
diff options
context:
space:
mode:
authorMatthew Dobson <colpatch@us.ibm.com>2006-03-26 01:37:45 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 08:56:59 -0800
commita19b27ce3847c3a5d4ea6b6c91b6f7154759af23 (patch)
tree794dc69869408bee9154b3e9d9852327e5219f4c /drivers/md/dm-crypt.c
parent6e0678f394c7bd21bfa5d252b071a09e10e7a749 (diff)
[PATCH] mempool: use common mempool page allocator
Convert two mempool users that currently use their own mempool-backed page allocators to use the generic mempool page allocator. Also included are 2 trivial whitespace fixes. 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-crypt.c')
-rw-r--r--drivers/md/dm-crypt.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index e7a650f9ca0..d88b8eda390 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -94,20 +94,6 @@ struct crypt_config {
static kmem_cache_t *_crypt_io_pool;
/*
- * Mempool alloc and free functions for the page
- */
-static void *mempool_alloc_page(gfp_t gfp_mask, void *data)
-{
- return alloc_page(gfp_mask);
-}
-
-static void mempool_free_page(void *page, void *data)
-{
- __free_page(page);
-}
-
-
-/*
* Different IV generation algorithms:
*
* plain: the initial vector is the 32-bit low-endian version of the sector
@@ -637,8 +623,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
goto bad3;
}
- cc->page_pool = mempool_create(MIN_POOL_PAGES, mempool_alloc_page,
- mempool_free_page, NULL);
+ cc->page_pool = mempool_create_page_pool(MIN_POOL_PAGES, 0);
if (!cc->page_pool) {
ti->error = PFX "Cannot allocate page mempool";
goto bad4;