aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-raid1.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index 6c1046df81f6..de26fde4098f 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -737,9 +737,12 @@ static void do_writes(struct mirror_set *ms, struct bio_list *writes)
737 dm_rh_delay(ms->rh, bio); 737 dm_rh_delay(ms->rh, bio);
738 738
739 while ((bio = bio_list_pop(&nosync))) { 739 while ((bio = bio_list_pop(&nosync))) {
740 if (unlikely(ms->leg_failure) && errors_handled(ms)) 740 if (unlikely(ms->leg_failure) && errors_handled(ms)) {
741 hold_bio(ms, bio); 741 spin_lock_irq(&ms->lock);
742 else { 742 bio_list_add(&ms->failures, bio);
743 spin_unlock_irq(&ms->lock);
744 wakeup_mirrord(ms);
745 } else {
743 map_bio(get_default_mirror(ms), bio); 746 map_bio(get_default_mirror(ms), bio);
744 generic_make_request(bio); 747 generic_make_request(bio);
745 } 748 }