diff options
author | Matthew Dobson <colpatch@us.ibm.com> | 2006-03-26 04:37:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 11:57:00 -0500 |
commit | 93d2341c750cda0df48a6cc67b35fe25f1ec47df (patch) | |
tree | f098a3bbfae65ce967591ee94d605c6e6bea21c6 /fs/bio.c | |
parent | fec433aaaae32a02329ad7d71b0f3c91b7525077 (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 'fs/bio.c')
-rw-r--r-- | fs/bio.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -1141,8 +1141,7 @@ static int biovec_create_pools(struct bio_set *bs, int pool_entries, int scale) | |||
1141 | if (i >= scale) | 1141 | if (i >= scale) |
1142 | pool_entries >>= 1; | 1142 | pool_entries >>= 1; |
1143 | 1143 | ||
1144 | *bvp = mempool_create(pool_entries, mempool_alloc_slab, | 1144 | *bvp = mempool_create_slab_pool(pool_entries, bp->slab); |
1145 | mempool_free_slab, bp->slab); | ||
1146 | if (!*bvp) | 1145 | if (!*bvp) |
1147 | return -ENOMEM; | 1146 | return -ENOMEM; |
1148 | } | 1147 | } |
@@ -1179,9 +1178,7 @@ struct bio_set *bioset_create(int bio_pool_size, int bvec_pool_size, int scale) | |||
1179 | if (!bs) | 1178 | if (!bs) |
1180 | return NULL; | 1179 | return NULL; |
1181 | 1180 | ||
1182 | bs->bio_pool = mempool_create(bio_pool_size, mempool_alloc_slab, | 1181 | bs->bio_pool = mempool_create_slab_pool(bio_pool_size, bio_slab); |
1183 | mempool_free_slab, bio_slab); | ||
1184 | |||
1185 | if (!bs->bio_pool) | 1182 | if (!bs->bio_pool) |
1186 | goto bad; | 1183 | goto bad; |
1187 | 1184 | ||