提交 896285ad 编写于 作者: C Chao Yu 提交者: Jaegeuk Kim

f2fs: fix to handle error in f2fs_disable_checkpoint()

In f2fs_disable_checkpoint(), it needs to detect and propagate error
number returned from f2fs_write_checkpoint().
Signed-off-by: NChao Yu <yuchao0@huawei.com>
Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
上级 d5d5f0c0
......@@ -1504,9 +1504,12 @@ static int f2fs_disable_checkpoint(struct f2fs_sb_info *sbi)
mutex_lock(&sbi->gc_mutex);
cpc.reason = CP_PAUSE;
set_sbi_flag(sbi, SBI_CP_DISABLED);
f2fs_write_checkpoint(sbi, &cpc);
err = f2fs_write_checkpoint(sbi, &cpc);
if (err)
goto out_unlock;
sbi->unusable_block_count = 0;
out_unlock:
mutex_unlock(&sbi->gc_mutex);
restore_flag:
sbi->sb->s_flags = s_flags; /* Restore MS_RDONLY status */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册