|
@@ -1138,7 +1138,7 @@ try_onemore:
|
|
* If filesystem is not mounted as read-only then
|
|
* If filesystem is not mounted as read-only then
|
|
* do start the gc_thread.
|
|
* do start the gc_thread.
|
|
*/
|
|
*/
|
|
- if (!f2fs_readonly(sb)) {
|
|
|
|
|
|
+ if (test_opt(sbi, BG_GC) && !f2fs_readonly(sb)) {
|
|
/* After POR, we can run background GC thread.*/
|
|
/* After POR, we can run background GC thread.*/
|
|
err = start_gc_thread(sbi);
|
|
err = start_gc_thread(sbi);
|
|
if (err)
|
|
if (err)
|