summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorChao Yu <chao@kernel.org>2022-01-18 04:48:02 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2022-01-25 02:40:04 +0100
commit7d19e3dab0002e527052b0aaf986e8c32e5537bf (patch)
treef4980266db7e38e1eb75aacbe06cf8e7c56b8b45 /fs/f2fs
parentf2fs: move f2fs to use reader-unfair rwsems (diff)
downloadlinux-7d19e3dab0002e527052b0aaf986e8c32e5537bf.tar.xz
linux-7d19e3dab0002e527052b0aaf986e8c32e5537bf.zip
f2fs: fix to enable ATGC correctly via gc_idle sysfs interface
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>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index ce70e798d0d4..2bccdaedfb00 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -481,7 +481,7 @@ out:
} else if (t == GC_IDLE_AT) {
if (!sbi->am.atgc_enabled)
return -EINVAL;
- sbi->gc_mode = GC_AT;
+ sbi->gc_mode = GC_IDLE_AT;
} else {
sbi->gc_mode = GC_NORMAL;
}