mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
fec433aaaa
commit
93d2341c75
19 changed files with 39 additions and 72 deletions
7
fs/bio.c
7
fs/bio.c
|
|
@ -1141,8 +1141,7 @@ static int biovec_create_pools(struct bio_set *bs, int pool_entries, int scale)
|
|||
if (i >= scale)
|
||||
pool_entries >>= 1;
|
||||
|
||||
*bvp = mempool_create(pool_entries, mempool_alloc_slab,
|
||||
mempool_free_slab, bp->slab);
|
||||
*bvp = mempool_create_slab_pool(pool_entries, bp->slab);
|
||||
if (!*bvp)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
|
@ -1179,9 +1178,7 @@ struct bio_set *bioset_create(int bio_pool_size, int bvec_pool_size, int scale)
|
|||
if (!bs)
|
||||
return NULL;
|
||||
|
||||
bs->bio_pool = mempool_create(bio_pool_size, mempool_alloc_slab,
|
||||
mempool_free_slab, bio_slab);
|
||||
|
||||
bs->bio_pool = mempool_create_slab_pool(bio_pool_size, bio_slab);
|
||||
if (!bs->bio_pool)
|
||||
goto bad;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue