summaryrefslogtreecommitdiffstats
path: root/fs/bio.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bio.c')
-rw-r--r--fs/bio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/bio.c b/fs/bio.c
index eb6b4683a265..1ab8986b0411 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;