aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 21222f5193fb..7199846364e9 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -635,8 +635,10 @@ static void dec_pending(struct dm_io *io, int error)
635 if (!md->barrier_error && io_error != -EOPNOTSUPP) 635 if (!md->barrier_error && io_error != -EOPNOTSUPP)
636 md->barrier_error = io_error; 636 md->barrier_error = io_error;
637 end_io_acct(io); 637 end_io_acct(io);
638 free_io(md, io);
638 } else { 639 } else {
639 end_io_acct(io); 640 end_io_acct(io);
641 free_io(md, io);
640 642
641 if (io_error != DM_ENDIO_REQUEUE) { 643 if (io_error != DM_ENDIO_REQUEUE) {
642 trace_block_bio_complete(md->queue, bio); 644 trace_block_bio_complete(md->queue, bio);
@@ -644,8 +646,6 @@ static void dec_pending(struct dm_io *io, int error)
644 bio_endio(bio, io_error); 646 bio_endio(bio, io_error);
645 } 647 }
646 } 648 }
647
648 free_io(md, io);
649 } 649 }
650} 650}
651 651