Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

f2fs: clean up to check bi_status w/ BLK_STS_OK

Check bi_status w/ BLK_STS_OK instead of 0 for cleanup.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

authored by

Chao Yu and committed by
Jaegeuk Kim
68e7f31e 019a8912

+4 -4
+1 -1
fs/f2fs/compress.c
··· 1483 1483 f2fs_is_compressed_page(page)); 1484 1484 int i; 1485 1485 1486 - if (unlikely(bio->bi_status)) 1486 + if (unlikely(bio->bi_status != BLK_STS_OK)) 1487 1487 mapping_set_error(cic->inode->i_mapping, -EIO); 1488 1488 1489 1489 f2fs_compress_free_page(page);
+3 -3
fs/f2fs/data.c
··· 151 151 } 152 152 153 153 dec_page_count(F2FS_F_SB(folio), __read_io_type(folio)); 154 - folio_end_read(folio, bio->bi_status == 0); 154 + folio_end_read(folio, bio->bi_status == BLK_STS_OK); 155 155 } 156 156 157 157 if (ctx) ··· 290 290 if (time_to_inject(sbi, FAULT_READ_IO)) 291 291 bio->bi_status = BLK_STS_IOERR; 292 292 293 - if (bio->bi_status) { 293 + if (bio->bi_status != BLK_STS_OK) { 294 294 f2fs_finish_read_bio(bio, intask); 295 295 return; 296 296 } ··· 347 347 348 348 type = WB_DATA_TYPE(&folio->page, false); 349 349 350 - if (unlikely(bio->bi_status)) { 350 + if (unlikely(bio->bi_status != BLK_STS_OK)) { 351 351 mapping_set_error(folio->mapping, -EIO); 352 352 if (type == F2FS_WB_CP_DATA) 353 353 f2fs_stop_checkpoint(sbi, true,