diff options
-rw-r--r-- | fs/f2fs/segment.c | 3 | ||||
-rw-r--r-- | fs/f2fs/super.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index ba067b1b8107..1e264e761f71 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c | |||
@@ -1859,10 +1859,9 @@ int build_segment_manager(struct f2fs_sb_info *sbi) | |||
1859 | sm_info->nr_discards = 0; | 1859 | sm_info->nr_discards = 0; |
1860 | sm_info->max_discards = 0; | 1860 | sm_info->max_discards = 0; |
1861 | 1861 | ||
1862 | if (test_opt(sbi, FLUSH_MERGE)) { | 1862 | if (test_opt(sbi, FLUSH_MERGE) && !f2fs_readonly(sbi->sb)) { |
1863 | spin_lock_init(&sm_info->issue_lock); | 1863 | spin_lock_init(&sm_info->issue_lock); |
1864 | init_waitqueue_head(&sm_info->flush_wait_queue); | 1864 | init_waitqueue_head(&sm_info->flush_wait_queue); |
1865 | |||
1866 | sm_info->f2fs_issue_flush = kthread_run(issue_flush_thread, sbi, | 1865 | sm_info->f2fs_issue_flush = kthread_run(issue_flush_thread, sbi, |
1867 | "f2fs_flush-%u:%u", MAJOR(dev), MINOR(dev)); | 1866 | "f2fs_flush-%u:%u", MAJOR(dev), MINOR(dev)); |
1868 | if (IS_ERR(sm_info->f2fs_issue_flush)) | 1867 | if (IS_ERR(sm_info->f2fs_issue_flush)) |
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index c756923a7302..5e20d2a36eac 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c | |||
@@ -514,7 +514,7 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root) | |||
514 | { | 514 | { |
515 | struct f2fs_sb_info *sbi = F2FS_SB(root->d_sb); | 515 | struct f2fs_sb_info *sbi = F2FS_SB(root->d_sb); |
516 | 516 | ||
517 | if (!(root->d_sb->s_flags & MS_RDONLY) && test_opt(sbi, BG_GC)) | 517 | if (!f2fs_readonly(sbi->sb) && test_opt(sbi, BG_GC)) |
518 | seq_printf(seq, ",background_gc=%s", "on"); | 518 | seq_printf(seq, ",background_gc=%s", "on"); |
519 | else | 519 | else |
520 | seq_printf(seq, ",background_gc=%s", "off"); | 520 | seq_printf(seq, ",background_gc=%s", "off"); |
@@ -542,7 +542,7 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root) | |||
542 | seq_puts(seq, ",disable_ext_identify"); | 542 | seq_puts(seq, ",disable_ext_identify"); |
543 | if (test_opt(sbi, INLINE_DATA)) | 543 | if (test_opt(sbi, INLINE_DATA)) |
544 | seq_puts(seq, ",inline_data"); | 544 | seq_puts(seq, ",inline_data"); |
545 | if (test_opt(sbi, FLUSH_MERGE)) | 545 | if (!f2fs_readonly(sbi->sb) && test_opt(sbi, FLUSH_MERGE)) |
546 | seq_puts(seq, ",flush_merge"); | 546 | seq_puts(seq, ",flush_merge"); |
547 | seq_printf(seq, ",active_logs=%u", sbi->active_logs); | 547 | seq_printf(seq, ",active_logs=%u", sbi->active_logs); |
548 | 548 | ||