aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/dm-cache-target.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index 1a090de0c4b8..1e96d7889f51 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -2690,11 +2690,11 @@ static int __cache_map(struct cache *cache, struct bio *bio, struct dm_bio_priso
2690static int cache_map(struct dm_target *ti, struct bio *bio) 2690static int cache_map(struct dm_target *ti, struct bio *bio)
2691{ 2691{
2692 int r; 2692 int r;
2693 struct dm_bio_prison_cell *cell; 2693 struct dm_bio_prison_cell *cell = NULL;
2694 struct cache *cache = ti->private; 2694 struct cache *cache = ti->private;
2695 2695
2696 r = __cache_map(cache, bio, &cell); 2696 r = __cache_map(cache, bio, &cell);
2697 if (r == DM_MAPIO_REMAPPED) { 2697 if (r == DM_MAPIO_REMAPPED && cell) {
2698 inc_ds(cache, bio, cell); 2698 inc_ds(cache, bio, cell);
2699 cell_defer(cache, cell, false); 2699 cell_defer(cache, cell, false);
2700 } 2700 }