]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - fs/bio.c
bio: move the slab pointer inside the bio_set
[mirror_ubuntu-zesty-kernel.git] / fs / bio.c
index eb6b4683a26538ca41118966a586dc9132e013ae..1ab8986b0411aea990f828ad82e04f4f7ab9b864 100644 (file)
--- 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;