aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/dm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 469cec54f371..ace998ce59f6 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -843,6 +843,8 @@ static int dm_merge_bvec(struct request_queue *q,
843 goto out; 843 goto out;
844 844
845 ti = dm_table_find_target(map, bvm->bi_sector); 845 ti = dm_table_find_target(map, bvm->bi_sector);
846 if (!dm_target_is_valid(ti))
847 goto out_table;
846 848
847 /* 849 /*
848 * Find maximum amount of I/O that won't need splitting 850 * Find maximum amount of I/O that won't need splitting
@@ -861,6 +863,7 @@ static int dm_merge_bvec(struct request_queue *q,
861 if (max_size && ti->type->merge) 863 if (max_size && ti->type->merge)
862 max_size = ti->type->merge(ti, bvm, biovec, max_size); 864 max_size = ti->type->merge(ti, bvm, biovec, max_size);
863 865
866out_table:
864 dm_table_put(map); 867 dm_table_put(map);
865 868
866out: 869out: