diff options
author | Chao Yu <yuchao0@huawei.com> | 2021-04-27 06:07:30 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-05-14 21:22:07 +0300 |
commit | ee68d27181f060fab29e60d1d31aab6a42703dd4 (patch) | |
tree | fd9dfc6035ef01d113706da22a8c7f0143764ea6 /fs | |
parent | 5db479f049c4fd6cb2d61ade28c73f51487c2f45 (diff) | |
download | linux-ee68d27181f060fab29e60d1d31aab6a42703dd4.tar.xz |
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')
-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 |