[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>
This commit is contained in:
Matthew Dobson
2006-03-26 01:37:45 -08:00
committed by Linus Torvalds
parent 6e0678f394
commit a19b27ce38
2 changed files with 8 additions and 32 deletions

View File

@@ -93,20 +93,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:
*
@@ -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;