aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 8f96d9372ade..870fe199bafb 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -615,7 +615,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
615 * Previous and new state of filesystem is RO, 615 * Previous and new state of filesystem is RO,
616 * so skip checking GC and FLUSH_MERGE conditions. 616 * so skip checking GC and FLUSH_MERGE conditions.
617 */ 617 */
618 if ((sb->s_flags & MS_RDONLY) && (*flags & MS_RDONLY)) 618 if (f2fs_readonly(sb) && (*flags & MS_RDONLY))
619 goto skip; 619 goto skip;
620 620
621 /* 621 /*
@@ -642,8 +642,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
642 */ 642 */
643 if ((*flags & MS_RDONLY) || !test_opt(sbi, FLUSH_MERGE)) { 643 if ((*flags & MS_RDONLY) || !test_opt(sbi, FLUSH_MERGE)) {
644 destroy_flush_cmd_control(sbi); 644 destroy_flush_cmd_control(sbi);
645 } else if (test_opt(sbi, FLUSH_MERGE) && 645 } else if (test_opt(sbi, FLUSH_MERGE) && !SM_I(sbi)->cmd_control_info) {
646 !sbi->sm_info->cmd_control_info) {
647 err = create_flush_cmd_control(sbi); 646 err = create_flush_cmd_control(sbi);
648 if (err) 647 if (err)
649 goto restore_gc; 648 goto restore_gc;
@@ -1082,7 +1081,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
1082 * If filesystem is not mounted as read-only then 1081 * If filesystem is not mounted as read-only then
1083 * do start the gc_thread. 1082 * do start the gc_thread.
1084 */ 1083 */
1085 if (!(sb->s_flags & MS_RDONLY)) { 1084 if (!f2fs_readonly(sb)) {
1086 /* After POR, we can run background GC thread.*/ 1085 /* After POR, we can run background GC thread.*/
1087 err = start_gc_thread(sbi); 1086 err = start_gc_thread(sbi);
1088 if (err) 1087 if (err)