md/raid6: avoid data corruption during recovery of double-degraded RAID6
[profile/ivi/kernel-x86-ivi.git] / drivers / md / raid5.c
index 16f5c21..18cda77 100644 (file)
@@ -3779,6 +3779,8 @@ static void handle_stripe(struct stripe_head *sh)
                                set_bit(R5_Wantwrite, &dev->flags);
                                if (prexor)
                                        continue;
+                               if (s.failed > 1)
+                                       continue;
                                if (!test_bit(R5_Insync, &dev->flags) ||
                                    ((i == sh->pd_idx || i == sh->qd_idx)  &&
                                     s.failed == 0))