Commit 11504a8e authored by Jaegeuk Kim's avatar Jaegeuk Kim

f2fs: avoid write_checkpoint if f2fs is mounted readonly

Do not change any partition when f2fs is changed to readonly mode.
Reviewed-by: default avatarChao Yu <chao2.yu@samsung.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 2d834bf9
...@@ -1067,6 +1067,8 @@ void write_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc) ...@@ -1067,6 +1067,8 @@ void write_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)
goto out; goto out;
if (unlikely(f2fs_cp_error(sbi))) if (unlikely(f2fs_cp_error(sbi)))
goto out; goto out;
if (f2fs_readonly(sbi->sb))
goto out;
if (block_operations(sbi)) if (block_operations(sbi))
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment