aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/dm-raid1.c3
-rw-r--r--drivers/md/dm-region-hash.c6
-rw-r--r--include/linux/dm-region-hash.h3
3 files changed, 4 insertions, 8 deletions
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index d1a7f1a4789c..4f466ad75680 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -779,7 +779,8 @@ static void do_failures(struct mirror_set *ms, struct bio_list *failures)
779 hold_bio(ms, bio); 779 hold_bio(ms, bio);
780 else { 780 else {
781 ms->in_sync = 0; 781 ms->in_sync = 0;
782 dm_rh_mark_nosync(ms->rh, bio, bio->bi_size, 0); 782 dm_rh_mark_nosync(ms->rh, bio);
783 bio_endio(bio, 0);
783 } 784 }
784 } 785 }
785} 786}
diff --git a/drivers/md/dm-region-hash.c b/drivers/md/dm-region-hash.c
index 00806b760ccd..5f19ceb6fe91 100644
--- a/drivers/md/dm-region-hash.c
+++ b/drivers/md/dm-region-hash.c
@@ -383,8 +383,6 @@ static void complete_resync_work(struct dm_region *reg, int success)
383/* dm_rh_mark_nosync 383/* dm_rh_mark_nosync
384 * @ms 384 * @ms
385 * @bio 385 * @bio
386 * @done
387 * @error
388 * 386 *
389 * The bio was written on some mirror(s) but failed on other mirror(s). 387 * The bio was written on some mirror(s) but failed on other mirror(s).
390 * We can successfully endio the bio but should avoid the region being 388 * We can successfully endio the bio but should avoid the region being
@@ -392,8 +390,7 @@ static void complete_resync_work(struct dm_region *reg, int success)
392 * 390 *
393 * This function is _not_ safe in interrupt context! 391 * This function is _not_ safe in interrupt context!
394 */ 392 */
395void dm_rh_mark_nosync(struct dm_region_hash *rh, 393void dm_rh_mark_nosync(struct dm_region_hash *rh, struct bio *bio)
396 struct bio *bio, unsigned done, int error)
397{ 394{
398 unsigned long flags; 395 unsigned long flags;
399 struct dm_dirty_log *log = rh->log; 396 struct dm_dirty_log *log = rh->log;
@@ -430,7 +427,6 @@ void dm_rh_mark_nosync(struct dm_region_hash *rh,
430 BUG_ON(!list_empty(&reg->list)); 427 BUG_ON(!list_empty(&reg->list));
431 spin_unlock_irqrestore(&rh->region_lock, flags); 428 spin_unlock_irqrestore(&rh->region_lock, flags);
432 429
433 bio_endio(bio, error);
434 if (recovering) 430 if (recovering)
435 complete_resync_work(reg, 0); 431 complete_resync_work(reg, 0);
436} 432}
diff --git a/include/linux/dm-region-hash.h b/include/linux/dm-region-hash.h
index a9e652a41373..9e2a7a401df5 100644
--- a/include/linux/dm-region-hash.h
+++ b/include/linux/dm-region-hash.h
@@ -78,8 +78,7 @@ void dm_rh_dec(struct dm_region_hash *rh, region_t region);
78/* Delay bios on regions. */ 78/* Delay bios on regions. */
79void dm_rh_delay(struct dm_region_hash *rh, struct bio *bio); 79void dm_rh_delay(struct dm_region_hash *rh, struct bio *bio);
80 80
81void dm_rh_mark_nosync(struct dm_region_hash *rh, 81void dm_rh_mark_nosync(struct dm_region_hash *rh, struct bio *bio);
82 struct bio *bio, unsigned done, int error);
83 82
84/* 83/*
85 * Region recovery control. 84 * Region recovery control.