Skip to content

Commit

Permalink
md: replace is_md_suspended() with 'mddev->suspended' in md_check_rec…
Browse files Browse the repository at this point in the history
…overy()

Prepare to cleanup pers->prepare_suspend(), which is used to fix a
deadlock in raid456 by returning error for io that is waiting for
reshape to make progress in mddev_suspend().

This change will allow reshape to make progress while waiting for io to
be done in mddev_suspend() in following patches.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20231010151958.145896-4-yukuai1@huaweicloud.com
  • Loading branch information
Yu Kuai authored and Song Liu committed Oct 11, 2023
1 parent 06a4d0d commit 2e82248
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -9418,7 +9418,7 @@ void md_check_recovery(struct mddev *mddev)
wake_up(&mddev->sb_wait);
}

if (is_md_suspended(mddev))
if (READ_ONCE(mddev->suspended))
return;

if (mddev->bitmap)
Expand Down

0 comments on commit 2e82248

Please sign in to comment.