diff options
author | Chao Yu <yuchao0@huawei.com> | 2021-04-27 11:07:30 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-05-14 11:22:07 -0700 |
commit | ee68d27181f060fab29e60d1d31aab6a42703dd4 (patch) | |
tree | fd9dfc6035ef01d113706da22a8c7f0143764ea6 /fs/f2fs/compress.c | |
parent | 5db479f049c4fd6cb2d61ade28c73f51487c2f45 (diff) | |
download | linux-ee68d27181f060fab29e60d1d31aab6a42703dd4.tar.bz2 |
f2fs: add cp_error check in f2fs_write_compressed_pages
This patch adds cp_error check in f2fs_write_compressed_pages() like we did
in f2fs_write_single_data_page()
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/compress.c')
-rw-r--r-- | fs/f2fs/compress.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 19097a1d0125..ac321e217d57 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -1216,6 +1216,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 |