aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/gc.c2
-rw-r--r--fs/f2fs/super.c2
2 files changed, 1 insertions, 3 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index b197a2f2993a..657683c9ee48 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -96,8 +96,6 @@ int start_gc_thread(struct f2fs_sb_info *sbi)
96 dev_t dev = sbi->sb->s_bdev->bd_dev; 96 dev_t dev = sbi->sb->s_bdev->bd_dev;
97 int err = 0; 97 int err = 0;
98 98
99 if (!test_opt(sbi, BG_GC))
100 goto out;
101 gc_th = kmalloc(sizeof(struct f2fs_gc_kthread), GFP_KERNEL); 99 gc_th = kmalloc(sizeof(struct f2fs_gc_kthread), GFP_KERNEL);
102 if (!gc_th) { 100 if (!gc_th) {
103 err = -ENOMEM; 101 err = -ENOMEM;
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 512ffd8e1624..536d41401748 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1138,7 +1138,7 @@ try_onemore:
1138 * If filesystem is not mounted as read-only then 1138 * If filesystem is not mounted as read-only then
1139 * do start the gc_thread. 1139 * do start the gc_thread.
1140 */ 1140 */
1141 if (!f2fs_readonly(sb)) { 1141 if (test_opt(sbi, BG_GC) && !f2fs_readonly(sb)) {
1142 /* After POR, we can run background GC thread.*/ 1142 /* After POR, we can run background GC thread.*/
1143 err = start_gc_thread(sbi); 1143 err = start_gc_thread(sbi);
1144 if (err) 1144 if (err)