We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a578a25 + 2fd7b0f commit e680a14Copy full SHA for e680a14
drivers/md/raid5.c
@@ -854,6 +854,13 @@ struct stripe_head *raid5_get_active_stripe(struct r5conf *conf,
854
855
set_bit(R5_INACTIVE_BLOCKED, &conf->cache_state);
856
r5l_wake_reclaim(conf->log, 0);
857
+
858
+ /* release batch_last before wait to avoid risk of deadlock */
859
+ if (ctx && ctx->batch_last) {
860
+ raid5_release_stripe(ctx->batch_last);
861
+ ctx->batch_last = NULL;
862
+ }
863
864
wait_event_lock_irq(conf->wait_for_stripe,
865
is_inactive_blocked(conf, hash),
866
*(conf->hash_locks + hash));
0 commit comments