From: Jens Axboe Date: Wed, 22 Oct 2008 18:32:58 +0000 (+0200) Subject: bio: move the slab pointer inside the bio_set X-Git-Tag: v2.6.29-rc1~569^2~17 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=1b4344986926da324b5cd10b683e5a1a5e1b7db3;p=linux-2.6-omap-h63xx.git bio: move the slab pointer inside the bio_set In preparation for adding differently sized bios. Signed-off-by: Jens Axboe --- diff --git a/fs/bio.c b/fs/bio.c index eb6b4683a26..1ab8986b041 100644 --- a/fs/bio.c +++ b/fs/bio.c @@ -1404,12 +1404,15 @@ void bioset_free(struct bio_set *bs) struct bio_set *bioset_create(int bio_pool_size, int bvec_pool_size) { - struct bio_set *bs = kzalloc(sizeof(*bs), GFP_KERNEL); + struct bio_set *bs; + bs = kzalloc(sizeof(*bs), GFP_KERNEL); if (!bs) return NULL; - bs->bio_pool = mempool_create_slab_pool(bio_pool_size, bio_slab); + bs->bio_slab = bio_slab; + + bs->bio_pool = mempool_create_slab_pool(bio_pool_size, bs->bio_slab); if (!bs->bio_pool) goto bad; diff --git a/include/linux/bio.h b/include/linux/bio.h index d76e4bf22f2..9340098d75d 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -400,6 +400,7 @@ static inline void bio_set_completion_cpu(struct bio *bio, unsigned int cpu) #define BIOVEC_MAX_IDX (BIOVEC_NR_POOLS - 1) struct bio_set { + struct kmem_cache *bio_slab; mempool_t *bio_pool; #if defined(CONFIG_BLK_DEV_INTEGRITY) mempool_t *bio_integrity_pool;