--- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -353,7 +353,7 @@ static void end_compressed_bio_write(str btrfs_record_physical_zoned(inode, cb->start, bio); btrfs_writepage_endio_finish_ordered(cb->compressed_pages[0], cb->start, cb->start + cb->len - 1, - bio->bi_status == BLK_STS_OK); + !cb->errors); cb->compressed_pages[0]->mapping = NULL; end_compressed_writeback(inode, cb);