diff options
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index ca1dd0cb04c5..81eaa221216c 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -4519,6 +4519,12 @@ static void analyse_stripe(struct stripe_head *sh, struct stripe_head_state *s) s->failed++; if (rdev && !test_bit(Faulty, &rdev->flags)) do_recovery = 1; + else if (!rdev) { + rdev = rcu_dereference( + conf->disks[i].replacement); + if (rdev && !test_bit(Faulty, &rdev->flags)) + do_recovery = 1; + } } if (test_bit(R5_InJournal, &dev->flags)) |