f2fs: fix to enable ATGC correctly via gc_idle sysfs interface
authorChao Yu <chao@kernel.org>
Tue, 18 Jan 2022 03:48:02 +0000 (11:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:10 +0000 (14:23 +0200)
commitd8c8dd97bb8cd5d1ab2857850e6166e51417435e
tree2ba263ce4a65755f517848361d654a4e697f6214
parentf69aecb49968e14196366bbe896eab0a904229f5
f2fs: fix to enable ATGC correctly via gc_idle sysfs interface

[ Upstream commit 7d19e3dab0002e527052b0aaf986e8c32e5537bf ]

It needs to assign sbi->gc_mode with GC_IDLE_AT rather than GC_AT when
user tries to enable ATGC via gc_idle sysfs interface, fix it.

Fixes: 093749e296e2 ("f2fs: support age threshold based garbage collection")
Cc: Zhipeng Tan <tanzhipeng@hust.edu.cn>
Signed-off-by: Jicheng Shao <shaojicheng@hust.edu.cn>
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/f2fs/sysfs.c