]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
md/raid5: ignore released_stripes check
authorShaohua Li <shli@fb.com>
Fri, 29 May 2015 00:33:47 +0000 (17:33 -0700)
committerNeilBrown <neilb@suse.de>
Wed, 17 Jun 2015 00:00:33 +0000 (10:00 +1000)
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 <shli@fb.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c

index 9a3b143b0b68a7caf956f9033944f9c46dccdc7b..59e44e99eef3bacd4703fd6883513688f7c58b09 100644 (file)
@@ -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);
                        }