f2fs: fix gc mode when gc_urgent_high_remaining is 1
authorYangtao Li <frank.li@vivo.com>
Tue, 25 Oct 2022 06:50:24 +0000 (14:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:31 +0000 (13:32 +0100)
commit7e7db55d1e67f0fa0e7347769cc1a53e85d9d4c2
tree8b59651d082ec950faceb0fd6d4c5c802cdca774
parentae6c960a82c52c3bda5adc82d90643d6c12d308e
f2fs: fix gc mode when gc_urgent_high_remaining is 1

[ Upstream commit 6359a1aaca527311b7145ec6eb16890a5ddf5214 ]

Under the current logic, when gc_urgent_high_remaining is set to 1,
the mode will be switched to normal at the beginning, instead of
running in gc_urgent mode.

Let's switch the gc mode back to normal when the gc ends.

Fixes: 265576181b4a ("f2fs: remove gc_urgent_high_limited for cleanup")
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/f2fs/gc.c