Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / fs / bio.c
index 062299acbccddc2d8f808d6cb85722cdd9ef6d09..72ab251cdb9cd0c527b8c18c58f9ca6bca1ed621 100644 (file)
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -302,9 +302,10 @@ void bio_init(struct bio *bio)
 struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs)
 {
        struct bio *bio = NULL;
+       void *p;
 
        if (bs) {
-               void *p = mempool_alloc(bs->bio_pool, gfp_mask);
+               p = mempool_alloc(bs->bio_pool, gfp_mask);
 
                if (p)
                        bio = p + bs->front_pad;
@@ -329,7 +330,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs)
                        }
                        if (unlikely(!bvl)) {
                                if (bs)
-                                       mempool_free(bio, bs->bio_pool);
+                                       mempool_free(p, bs->bio_pool);
                                else
                                        kfree(bio);
                                bio = NULL;