From: Shaohua Li Date: Fri, 29 May 2015 00:33:47 +0000 (-0700) Subject: md/raid5: ignore released_stripes check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=713bc5c2deb437ef40d48374ae6a57e030bd9e35;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git md/raid5: ignore released_stripes check conf->released_stripes list isn't always related to where there are free stripes pending. Active stripes can be in the list too. And even free stripes were active very recently. Signed-off-by: Shaohua Li Signed-off-by: NeilBrown --- diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 9a3b143b0b68..59e44e99eef3 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -681,8 +681,8 @@ get_active_stripe(struct r5conf *conf, sector_t sector, if (!sh) { if (!test_bit(R5_INACTIVE_BLOCKED, &conf->cache_state)) { sh = get_free_stripe(conf, hash); - if (!sh && llist_empty(&conf->released_stripes) && - !test_bit(R5_DID_ALLOC, &conf->cache_state)) + if (!sh && !test_bit(R5_DID_ALLOC, + &conf->cache_state)) set_bit(R5_ALLOC_MORE, &conf->cache_state); }