]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/md/raid5.c
[PATCH] md: fix resync speed calculation for restarted resyncs
[karo-tx-linux.git] / drivers / md / raid5.c
index a02f35f1a796b6d9e53dca671c248279fd9b4698..dd0d00108a31a1eb8c502795839eda3108c6988e 100644 (file)
@@ -281,7 +281,8 @@ static struct stripe_head *get_active_stripe(raid5_conf_t *conf, sector_t sector
                        } else {
                                if (!test_bit(STRIPE_HANDLE, &sh->state))
                                        atomic_inc(&conf->active_stripes);
-                               if (list_empty(&sh->lru))
+                               if (list_empty(&sh->lru) &&
+                                   !test_bit(STRIPE_EXPANDING, &sh->state))
                                        BUG();
                                list_del_init(&sh->lru);
                        }