summaryrefslogtreecommitdiff
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-10-16 10:18:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-10-16 10:18:49 +0200
commitfe2017ba24f318e5feef487b7552e40a3de2d50a (patch)
tree59f3695ecd07645910210156fc8255da99aba6f7 /drivers/md/raid5.c
parentdd976a97d15b47656991e185a94ef42a0fa5cfd4 (diff)
parent58720809f52779dc0f08e53e54b014209d13eebb (diff)
Merge 6.6-rc6 into tty-next
We need the tty/serial fixes in here as well for testing, and this resolves merge conflicts in: drivers/tty/serial/serial_core.c as reported in linux-next Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 4cb9c608ee19..284cd71bcc68 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -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));