diff options
Diffstat (limited to 'fs/btrfs/compression.c')
-rw-r--r-- | fs/btrfs/compression.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index b189bd1e7a3e..37dff5b2d56d 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c | |||
@@ -639,7 +639,11 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, | |||
639 | faili = nr_pages - 1; | 639 | faili = nr_pages - 1; |
640 | cb->nr_pages = nr_pages; | 640 | cb->nr_pages = nr_pages; |
641 | 641 | ||
642 | add_ra_bio_pages(inode, em_start + em_len, cb); | 642 | /* In the parent-locked case, we only locked the range we are |
643 | * interested in. In all other cases, we can opportunistically | ||
644 | * cache decompressed data that goes beyond the requested range. */ | ||
645 | if (!(bio_flags & EXTENT_BIO_PARENT_LOCKED)) | ||
646 | add_ra_bio_pages(inode, em_start + em_len, cb); | ||
643 | 647 | ||
644 | /* include any pages we added in add_ra-bio_pages */ | 648 | /* include any pages we added in add_ra-bio_pages */ |
645 | uncompressed_len = bio->bi_vcnt * PAGE_CACHE_SIZE; | 649 | uncompressed_len = bio->bi_vcnt * PAGE_CACHE_SIZE; |