Skip to content

Commit 86ad4cd

Browse files
YuKuai-huaweiliu-song-6
authored andcommitted
md: Don't flush sync_work in md_write_start()
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: bc08041 ("md: suspend array in md_start_sync() if array need reconfiguration") Cc: [email protected] Signed-off-by: Yu Kuai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Song Liu <[email protected]>
1 parent ca95887 commit 86ad4cd

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/md/md.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8668,7 +8668,6 @@ void md_write_start(struct mddev *mddev, struct bio *bi)
86688668
BUG_ON(mddev->ro == MD_RDONLY);
86698669
if (mddev->ro == MD_AUTO_READ) {
86708670
/* need to switch to read/write */
8671-
flush_work(&mddev->sync_work);
86728671
mddev->ro = MD_RDWR;
86738672
set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
86748673
md_wakeup_thread(mddev->thread);

0 commit comments

Comments
 (0)