summaryrefslogtreecommitdiff
path: root/disk-io.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2017-06-13 17:19:25 +0800
committerDavid Sterba <dsterba@suse.com>2017-07-12 17:53:18 +0200
commit6aaf1b10e79d20db0727f0d56ce6a618bdc22285 (patch)
tree1fb9d62146cc7ae116fe632243c819fc78def1ae /disk-io.c
parentb350e8fd76090bb1ff8c1574dcf1b1d7a571a3ca (diff)
btrfs-progs: Refactor btrfs_find_tree_block to use btrfs_fs_info
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'disk-io.c')
-rw-r--r--disk-io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/disk-io.c b/disk-io.c
index 8b5139f5..7addaf61 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -174,10 +174,10 @@ int csum_tree_block(struct btrfs_fs_info *fs_info,
return csum_tree_block_size(buf, csum_size, verify);
}
-struct extent_buffer *btrfs_find_tree_block(struct btrfs_root *root,
+struct extent_buffer *btrfs_find_tree_block(struct btrfs_fs_info *fs_info,
u64 bytenr, u32 blocksize)
{
- return find_extent_buffer(&root->fs_info->extent_cache,
+ return find_extent_buffer(&fs_info->extent_cache,
bytenr, blocksize);
}
@@ -195,7 +195,7 @@ void readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize,
struct btrfs_multi_bio *multi = NULL;
struct btrfs_device *device;
- eb = btrfs_find_tree_block(root, bytenr, blocksize);
+ eb = btrfs_find_tree_block(root->fs_info, bytenr, blocksize);
if (!(eb && btrfs_buffer_uptodate(eb, parent_transid)) &&
!btrfs_map_block(root->fs_info, READ, bytenr, &length, &multi, 0,
NULL)) {