diff options
| -rw-r--r-- | drivers/md/raid5.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 302d7cd2076c..f8b906843926 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
| @@ -2922,6 +2922,14 @@ static void handle_stripe_clean_event(struct r5conf *conf, | |||
| 2922 | } | 2922 | } |
| 2923 | /* now that discard is done we can proceed with any sync */ | 2923 | /* now that discard is done we can proceed with any sync */ |
| 2924 | clear_bit(STRIPE_DISCARD, &sh->state); | 2924 | clear_bit(STRIPE_DISCARD, &sh->state); |
| 2925 | /* | ||
| 2926 | * SCSI discard will change some bio fields and the stripe has | ||
| 2927 | * no updated data, so remove it from hash list and the stripe | ||
| 2928 | * will be reinitialized | ||
| 2929 | */ | ||
| 2930 | spin_lock_irq(&conf->device_lock); | ||
| 2931 | remove_hash(sh); | ||
| 2932 | spin_unlock_irq(&conf->device_lock); | ||
| 2925 | if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state)) | 2933 | if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state)) |
| 2926 | set_bit(STRIPE_HANDLE, &sh->state); | 2934 | set_bit(STRIPE_HANDLE, &sh->state); |
| 2927 | 2935 | ||
