diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2017-05-18 10:51:08 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-07-03 13:35:11 +0200 |
commit | 8690c887d1dcad384d44ca21bf950a4ec2fbffdb (patch) | |
tree | bf736b51824e4e834c4d0e8ea79169bf40849d04 /backref.c | |
parent | 060c7b3a1a40d2e9cacbdb37a02791bacae32491 (diff) |
btrfs-progs: Refactor read_tree_block to get rid of btrfs_root
The only reasom read_tree_block() needs a btrfs_root parameter is to get
its node/sector size.
And long ago, I have already introduced a compactible interface,
read_tree_block_fs_info() to pass btrfs_fs_info instead of btrfs_root.
Since we have cleaned up all root->sector/node/stripesize users, we
should be OK to refactor read_tree_block() function.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Diffstat (limited to 'backref.c')
-rw-r--r-- | backref.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -450,7 +450,7 @@ static int __add_missing_keys(struct btrfs_fs_info *fs_info, if (ref->key_for_search.type) continue; BUG_ON(!ref->wanted_disk_byte); - eb = read_tree_block(fs_info->tree_root, ref->wanted_disk_byte, + eb = read_tree_block(fs_info, ref->wanted_disk_byte, fs_info->nodesize, 0); if (!extent_buffer_uptodate(eb)) { free_extent_buffer(eb); @@ -805,8 +805,8 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans, u32 bsz; struct extent_buffer *eb; bsz = fs_info->nodesize; - eb = read_tree_block(fs_info->extent_root, - ref->parent, bsz, 0); + eb = read_tree_block(fs_info, + ref->parent, bsz, 0); if (!extent_buffer_uptodate(eb)) { free_extent_buffer(eb); ret = -EIO; |