diff options
Diffstat (limited to 'fs/bio.c')
-rw-r--r-- | fs/bio.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -302,9 +302,10 @@ void bio_init(struct bio *bio) | |||
302 | struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs) | 302 | struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs) |
303 | { | 303 | { |
304 | struct bio *bio = NULL; | 304 | struct bio *bio = NULL; |
305 | void *uninitialized_var(p); | ||
305 | 306 | ||
306 | if (bs) { | 307 | if (bs) { |
307 | void *p = mempool_alloc(bs->bio_pool, gfp_mask); | 308 | p = mempool_alloc(bs->bio_pool, gfp_mask); |
308 | 309 | ||
309 | if (p) | 310 | if (p) |
310 | bio = p + bs->front_pad; | 311 | 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) | |||
329 | } | 330 | } |
330 | if (unlikely(!bvl)) { | 331 | if (unlikely(!bvl)) { |
331 | if (bs) | 332 | if (bs) |
332 | mempool_free(bio, bs->bio_pool); | 333 | mempool_free(p, bs->bio_pool); |
333 | else | 334 | else |
334 | kfree(bio); | 335 | kfree(bio); |
335 | bio = NULL; | 336 | bio = NULL; |