]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/md/raid5.c
Merge remote-tracking branch 'ipsec/master'
[karo-tx-linux.git] / drivers / md / raid5.c
index 302d7cd2076c61ea557caf0f77c2ba3f4f6f8b79..f8b9068439267a3539d671e6e59ceb0b47b90547 100644 (file)
@@ -2922,6 +2922,14 @@ static void handle_stripe_clean_event(struct r5conf *conf,
                }
                /* now that discard is done we can proceed with any sync */
                clear_bit(STRIPE_DISCARD, &sh->state);
+               /*
+                * SCSI discard will change some bio fields and the stripe has
+                * no updated data, so remove it from hash list and the stripe
+                * will be reinitialized
+                */
+               spin_lock_irq(&conf->device_lock);
+               remove_hash(sh);
+               spin_unlock_irq(&conf->device_lock);
                if (test_bit(STRIPE_SYNC_REQUESTED, &sh->state))
                        set_bit(STRIPE_HANDLE, &sh->state);