diff options
author | 2023-10-06 15:43:19 -0700 | |
---|---|---|
committer | 2023-10-06 15:43:19 -0700 | |
commit | fc5b94f1cb405c7129a337db6ae7db3b1e325c48 (patch) | |
tree | c18215a81e475640b1e86e2ae98d5e18c9b38549 /drivers/md | |
parent | Merge tag 'io_uring-6.6-2023-10-06' of git://git.kernel.dk/linux (diff) | |
parent | nbd: don't call blk_mark_disk_dead nbd_clear_sock_ioctl (diff) | |
download | linux-fc5b94f1cb405c7129a337db6ae7db3b1e325c48.tar.gz linux-fc5b94f1cb405c7129a337db6ae7db3b1e325c48.tar.bz2 linux-fc5b94f1cb405c7129a337db6ae7db3b1e325c48.zip |
Merge tag 'block-6.6-2023-10-06' of git://git.kernel.dk/linux
Pull block fixes from Jens Axboe:
"Just two minor fixes, for nbd and md"
* tag 'block-6.6-2023-10-06' of git://git.kernel.dk/linux:
nbd: don't call blk_mark_disk_dead nbd_clear_sock_ioctl
md/raid5: release batch_last before waiting for another stripe_head
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/raid5.c | 7 |
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)); |