diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/raid5.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 758b77296404..36c0a158730b 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -2552,8 +2552,10 @@ handle_failed_stripe(struct r5conf *conf, struct stripe_head *sh, if (!test_bit(R5_Wantfill, &sh->dev[i].flags) && (!test_bit(R5_Insync, &sh->dev[i].flags) || test_bit(R5_ReadError, &sh->dev[i].flags))) { + spin_lock_irq(&sh->stripe_lock); bi = sh->dev[i].toread; sh->dev[i].toread = NULL; + spin_unlock_irq(&sh->stripe_lock); if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) wake_up(&conf->wait_for_overlap); if (bi) s->to_read--; |