btrfs: do not try to unlock the extent for non-subpage metadata reads
Only subpage metadata reads lock the extent. Don't try to unlock it and waste cycles in the extent tree lookup for PAGE_SIZE or larger metadata. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
046b562b20
commit
3d66b4b27d
|
@ -4208,8 +4208,10 @@ static void extent_buffer_read_end_io(struct btrfs_bio *bbio)
|
|||
bio_offset += bvec->bv_len;
|
||||
}
|
||||
|
||||
unlock_extent(&bbio->inode->io_tree, eb->start,
|
||||
eb->start + bio_offset - 1, NULL);
|
||||
if (eb->fs_info->nodesize < PAGE_SIZE) {
|
||||
unlock_extent(&bbio->inode->io_tree, eb->start,
|
||||
eb->start + bio_offset - 1, NULL);
|
||||
}
|
||||
free_extent_buffer(eb);
|
||||
|
||||
bio_put(&bbio->bio);
|
||||
|
|
Loading…
Reference in New Issue