|
@@ -615,7 +615,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
|
|
|
* Previous and new state of filesystem is RO,
|
|
|
* so skip checking GC and FLUSH_MERGE conditions.
|
|
|
*/
|
|
|
- if ((sb->s_flags & MS_RDONLY) && (*flags & MS_RDONLY))
|
|
|
+ if (f2fs_readonly(sb) && (*flags & MS_RDONLY))
|
|
|
goto skip;
|
|
|
|
|
|
/*
|
|
@@ -642,8 +642,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
|
|
|
*/
|
|
|
if ((*flags & MS_RDONLY) || !test_opt(sbi, FLUSH_MERGE)) {
|
|
|
destroy_flush_cmd_control(sbi);
|
|
|
- } else if (test_opt(sbi, FLUSH_MERGE) &&
|
|
|
- !sbi->sm_info->cmd_control_info) {
|
|
|
+ } else if (test_opt(sbi, FLUSH_MERGE) && !SM_I(sbi)->cmd_control_info) {
|
|
|
err = create_flush_cmd_control(sbi);
|
|
|
if (err)
|
|
|
goto restore_gc;
|
|
@@ -1082,7 +1081,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
|
|
|
* If filesystem is not mounted as read-only then
|
|
|
* do start the gc_thread.
|
|
|
*/
|
|
|
- if (!(sb->s_flags & MS_RDONLY)) {
|
|
|
+ if (!f2fs_readonly(sb)) {
|
|
|
/* After POR, we can run background GC thread.*/
|
|
|
err = start_gc_thread(sbi);
|
|
|
if (err)
|