f2fs: avoid write_checkpoint if f2fs is mounted readonly
authorJaegeuk Kim <jaegeuk@kernel.org>
Sat, 24 Jan 2015 02:43:45 +0000 (18:43 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 12 Feb 2015 01:04:40 +0000 (17:04 -0800)
Do not change any partition when f2fs is changed to readonly mode.

Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c

index 19021414d1953490277a09aabbddf1e30f0be4a3..22165fb1d0d141f92162bd8c7fafa8960db19444 100644 (file)
@@ -1067,6 +1067,8 @@ void write_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)
                goto out;
        if (unlikely(f2fs_cp_error(sbi)))
                goto out;
+       if (f2fs_readonly(sbi->sb))
+               goto out;
        if (block_operations(sbi))
                goto out;
 
This page took 0.025697 seconds and 5 git commands to generate.