Skip to content

Commit

Permalink
Merge tag 'md-fixes-20231003' of https://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/kernel/git/song/md into block-6.6

Pull MD fix from Song.

* tag 'md-fixes-20231003' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md:
  md/raid5: release batch_last before waiting for another stripe_head
  • Loading branch information
Jens Axboe committed Oct 3, 2023
2 parents a578a25 + 2fd7b0f commit e680a14
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,13 @@ struct stripe_head *raid5_get_active_stripe(struct r5conf *conf,

set_bit(R5_INACTIVE_BLOCKED, &conf->cache_state);
r5l_wake_reclaim(conf->log, 0);

/* release batch_last before wait to avoid risk of deadlock */
if (ctx && ctx->batch_last) {
raid5_release_stripe(ctx->batch_last);
ctx->batch_last = NULL;
}

wait_event_lock_irq(conf->wait_for_stripe,
is_inactive_blocked(conf, hash),
*(conf->hash_locks + hash));
Expand Down

0 comments on commit e680a14

Please sign in to comment.