summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2015-01-23 18:43:45 -0800
committerJaegeuk Kim <jaegeuk@kernel.org>2015-02-11 17:04:40 -0800
commit11504a8e7e20e2ff2e68176850e9b83b8bae760e (patch)
treee7a6b89c955594bde7e38a1302b5343ab6056e11 /fs/f2fs
parent2d834bf9ac8e40d9ae2a2dcde2348bd028f87ec4 (diff)
downloadblackbird-op-linux-11504a8e7e20e2ff2e68176850e9b83b8bae760e.tar.gz
blackbird-op-linux-11504a8e7e20e2ff2e68176850e9b83b8bae760e.zip
f2fs: avoid write_checkpoint if f2fs is mounted readonly
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>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/checkpoint.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 19021414d195..22165fb1d0d1 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -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;
OpenPOWER on IntegriCloud