]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
md: Don't flush sync_work in md_write_start()
authorYu Kuai <yukuai3@huawei.com>
Thu, 1 Aug 2024 12:47:46 +0000 (20:47 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:38:50 +0000 (16:38 +0200)
commit5f309cba475fd9c67f185d8b409f8555f56b843c
treeabd2866000bb7621bad95a9f487ac8d5a0182180
parent271fdbc0b77580daa1c5c5e3d694b39ac8ec5997
md: Don't flush sync_work in md_write_start()

commit 86ad4cda79e0dade87d4bb0d32e1fe541d4a63e8 upstream.

Because flush sync_work may trigger mddev_suspend() if there are spares,
and this should never be done in IO path because mddev_suspend() is used
to wait for IO.

This problem is found by code review.

Fixes: bc08041b32ab ("md: suspend array in md_start_sync() if array need reconfiguration")
Cc: stable@vger.kernel.org
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20240801124746.242558-1-yukuai1@huaweicloud.com
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/md.c