In f2fs_disable_checkpoint(), it needs to detect and propagate error
number returned from f2fs_write_checkpoint().
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
        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 */