struct block_device *bdev;
struct bio *comp_bio;
u64 cur_disk_byte = (u64)bio->bi_sector << 9;
+ u64 em_len;
+ u64 em_start;
struct extent_map *em;
int ret;
cb->start = em->orig_start;
compressed_len = em->block_len;
+ em_len = em->len;
+ em_start = em->start;
free_extent_map(em);
+ em = NULL;
cb->len = uncompressed_len;
cb->compressed_len = compressed_len;
}
cb->nr_pages = nr_pages;
- add_ra_bio_pages(inode, em->start + em->len, cb);
+ add_ra_bio_pages(inode, em_start + em_len, cb);
if (!btrfs_test_opt(root, NODATASUM) &&
!btrfs_test_flag(inode, NODATASUM)) {