Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 129006
b: refs/heads/master
c: e04ca62
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason committed Nov 10, 2008
1 parent dcba927 commit af26b7a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ff5b7ee33d82414bf4baf299c21fb703bcc89629
refs/heads/master: e04ca626baee684bea9d6239e4e1119b696101b2
7 changes: 6 additions & 1 deletion trunk/fs/btrfs/compression.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,8 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
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;

Expand All @@ -525,7 +527,10 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,

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;
Expand All @@ -543,7 +548,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
}
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)) {
Expand Down

0 comments on commit af26b7a

Please sign in to comment.