diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-26 14:45:22 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-26 14:45:22 (GMT) |
commit | a5ebc0b1a7843508b375f7ab8a36a628e5c9f372 (patch) | |
tree | 04d3ab410e08b4d9174c663dd6bf95611dd16d0a /fs/bio.c | |
parent | 5ba1ae92b6796b3367152ccd9baa022dde7eed4c (diff) | |
parent | 8e0ee43bc2c3e19db56a4adaa9a9b04ce885cd84 (diff) | |
download | linux-fsl-qoriq-a5ebc0b1a7843508b375f7ab8a36a628e5c9f372.tar.xz |
Merge commit 'v2.6.29' into timers/core
Diffstat (limited to 'fs/bio.c')
-rw-r--r-- | fs/bio.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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 *uninitialized_var(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; @@ -462,10 +463,12 @@ struct bio *bio_clone(struct bio *bio, gfp_t gfp_mask) if (bio_integrity(bio)) { int ret; - ret = bio_integrity_clone(b, bio, fs_bio_set); + ret = bio_integrity_clone(b, bio, gfp_mask, fs_bio_set); - if (ret < 0) + if (ret < 0) { + bio_put(b); return NULL; + } } return b; |