Skip to content

Commit 9eeaa26

Browse files
chaseyuJaegeuk Kim
authored and
Jaegeuk Kim
committed
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 <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 2ba2a38 commit 9eeaa26

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fs/f2fs/compress.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,12 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
12171217
loff_t psize;
12181218
int i, err;
12191219

1220+
/* we should bypass data pages to proceed the kworkder jobs */
1221+
if (unlikely(f2fs_cp_error(sbi))) {
1222+
mapping_set_error(cc->rpages[0]->mapping, -EIO);
1223+
goto out_free;
1224+
}
1225+
12201226
if (IS_NOQUOTA(inode)) {
12211227
/*
12221228
* We need to wait for node_write to avoid block allocation during

0 commit comments

Comments
 (0)