Skip to content
Commit e24ed043 authored by Yu Kuai's avatar Yu Kuai Committed by Song Liu
Browse files

md: restore 'noio_flag' for the last mddev_resume()



memalloc_noio_save() is called for the first mddev_suspend(), and
repeated mddev_suspend() only increase 'suspended'. However,
memalloc_noio_restore() is also called for the first mddev_resume(),
which means that memory reclaim will be enabled before the last
mddev_resume() is called, while the array is still suspended.

Fix this problem by restore 'noio_flag' for the last mddev_resume().

Fixes: 78f57ef9 ("md: use memalloc scope APIs in mddev_suspend()/mddev_resume()")
Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20230628012931.88911-3-yukuai1@huaweicloud.com


Signed-off-by: default avatarSong Liu <song@kernel.org>
parent b39f35eb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment