diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index be6f2988ac7f..9dc2e09f0a60 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -1161,6 +1161,12 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc, loff_t psize; int i, err; + /* we should bypass data pages to proceed the kworkder jobs */ + if (unlikely(f2fs_cp_error(sbi))) { + mapping_set_error(cc->rpages[0]->mapping, -EIO); + goto out_free; + } + if (IS_NOQUOTA(inode)) { /* * We need to wait for node_write to avoid block allocation during