aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 7ec1b112a6d5..dd50e30b6dcf 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -89,7 +89,7 @@ struct mapped_device {
89 */ 89 */
90 atomic_t pending; 90 atomic_t pending;
91 wait_queue_head_t wait; 91 wait_queue_head_t wait;
92 struct bio_list deferred; 92 struct bio_list deferred;
93 93
94 /* 94 /*
95 * The current mapping. 95 * The current mapping.
@@ -482,7 +482,6 @@ static int clone_endio(struct bio *bio, unsigned int done, int error)
482 r = endio(tio->ti, bio, error, &tio->info); 482 r = endio(tio->ti, bio, error, &tio->info);
483 if (r < 0) 483 if (r < 0)
484 error = r; 484 error = r;
485
486 else if (r > 0) 485 else if (r > 0)
487 /* the target wants another shot at the io */ 486 /* the target wants another shot at the io */
488 return 1; 487 return 1;
@@ -551,9 +550,7 @@ static void __map_bio(struct dm_target *ti, struct bio *clone,
551 clone->bi_sector); 550 clone->bi_sector);
552 551
553 generic_make_request(clone); 552 generic_make_request(clone);
554 } 553 } else if (r < 0) {
555
556 else if (r < 0) {
557 /* error the io and bail out */ 554 /* error the io and bail out */
558 md = tio->io->md; 555 md = tio->io->md;
559 dec_pending(tio->io, r); 556 dec_pending(tio->io, r);
@@ -966,8 +963,8 @@ static struct mapped_device *alloc_dev(int minor)
966 md->queue->issue_flush_fn = dm_flush_all; 963 md->queue->issue_flush_fn = dm_flush_all;
967 964
968 md->io_pool = mempool_create_slab_pool(MIN_IOS, _io_cache); 965 md->io_pool = mempool_create_slab_pool(MIN_IOS, _io_cache);
969 if (!md->io_pool) 966 if (!md->io_pool)
970 goto bad2; 967 goto bad2;
971 968
972 md->tio_pool = mempool_create_slab_pool(MIN_IOS, _tio_cache); 969 md->tio_pool = mempool_create_slab_pool(MIN_IOS, _tio_cache);
973 if (!md->tio_pool) 970 if (!md->tio_pool)