drivers/md/md-bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
From: Chen Cheng <chencheng@fnnas.com>
backlog_store() suspends the array before checking whether a write-mostly
device exists. If no such device exists, the error path only unlocks
reconfig_mutex and leaves the array suspended, blocking subsequent I/O.
Use mddev_unlock_and_resume() to release both states.
Fixes: 58226942ad3d ("md: use new apis to suspend array before mddev_create/destroy_serial_pool")
Signed-off-by: Chen Cheng <chencheng@fnnas.com>
---
drivers/md/md-bitmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
index 028b9ca8ce52..3e40cb45d473 100644
--- a/drivers/md/md-bitmap.c
+++ b/drivers/md/md-bitmap.c
@@ -2854,11 +2854,11 @@ backlog_store(struct mddev *mddev, const char *buf, size_t len)
}
}
if (!has_write_mostly) {
pr_warn_ratelimited("%s: can't set backlog, no write mostly device available\n",
mdname(mddev));
- mddev_unlock(mddev);
+ mddev_unlock_and_resume(mddev);
return -EINVAL;
}
mddev->bitmap_info.max_write_behind = backlog;
if (!backlog && mddev->serial_info_pool) {
--
2.54.0
在 2026/7/18 11:42, Chen Cheng 写道:
> From: Chen Cheng<chencheng@fnnas.com>
>
> backlog_store() suspends the array before checking whether a write-mostly
> device exists. If no such device exists, the error path only unlocks
> reconfig_mutex and leaves the array suspended, blocking subsequent I/O.
>
> Use mddev_unlock_and_resume() to release both states.
>
> Fixes: 58226942ad3d ("md: use new apis to suspend array before mddev_create/destroy_serial_pool")
>
> Signed-off-by: Chen Cheng<chencheng@fnnas.com>
> ---
> drivers/md/md-bitmap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Yu Kuai <yukuai@fygo.io>
--
Thanks,
Kuai
© 2016 - 2026 Red Hat, Inc.