diff options
Diffstat (limited to 'fs/btrfs/compression.c')
-rw-r--r-- | fs/btrfs/compression.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 7397c622fb6a..8e7a78acf81a 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c | |||
@@ -505,7 +505,6 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, | |||
505 | struct block_device *bdev; | 505 | struct block_device *bdev; |
506 | struct bio *comp_bio; | 506 | struct bio *comp_bio; |
507 | u64 cur_disk_byte = (u64)bio->bi_sector << 9; | 507 | u64 cur_disk_byte = (u64)bio->bi_sector << 9; |
508 | u64 em_len; | ||
509 | struct extent_map *em; | 508 | struct extent_map *em; |
510 | int ret; | 509 | int ret; |
511 | 510 | ||
@@ -524,9 +523,8 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, | |||
524 | cb->errors = 0; | 523 | cb->errors = 0; |
525 | cb->inode = inode; | 524 | cb->inode = inode; |
526 | 525 | ||
527 | cb->start = em->start; | 526 | cb->start = em->orig_start; |
528 | compressed_len = em->block_len; | 527 | compressed_len = em->block_len; |
529 | em_len = em->len; | ||
530 | free_extent_map(em); | 528 | free_extent_map(em); |
531 | 529 | ||
532 | cb->len = uncompressed_len; | 530 | cb->len = uncompressed_len; |
@@ -545,7 +543,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, | |||
545 | } | 543 | } |
546 | cb->nr_pages = nr_pages; | 544 | cb->nr_pages = nr_pages; |
547 | 545 | ||
548 | add_ra_bio_pages(inode, cb->start + em_len, cb); | 546 | add_ra_bio_pages(inode, em->start + em->len, cb); |
549 | 547 | ||
550 | if (!btrfs_test_opt(root, NODATASUM) && | 548 | if (!btrfs_test_opt(root, NODATASUM) && |
551 | !btrfs_test_flag(inode, NODATASUM)) { | 549 | !btrfs_test_flag(inode, NODATASUM)) { |