summaryrefslogtreecommitdiff
path: root/extent-tree.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2017-06-13 17:19:17 +0800
committerDavid Sterba <dsterba@suse.com>2017-07-12 17:52:09 +0200
commit3e611c698386db7d8ec998caf3ee0ce5b40d1e9b (patch)
treee37d674501991b0a9647bfd85633f9edeb262585 /extent-tree.c
parentd39731a53bb6212effc184719296e39f5200ee94 (diff)
btrfs-progs: Refactor btrfs_map_block and its variants to use btrfs_fs_info
Just to keep the 1st paramter the same as kernel. We can also save a few lines since the parameter is shorter now. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'extent-tree.c')
-rw-r--r--extent-tree.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/extent-tree.c b/extent-tree.c
index 43fa3b5..f252c0c 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -69,13 +69,13 @@ static int remove_sb_from_cache(struct btrfs_root *root,
u64 *logical;
int stripe_len;
int i, nr, ret;
+ struct btrfs_fs_info *fs_info = root->fs_info;
struct extent_io_tree *free_space_cache;
- free_space_cache = &root->fs_info->free_space_cache;
+ free_space_cache = &fs_info->free_space_cache;
for (i = 0; i < BTRFS_SUPER_MIRROR_MAX; i++) {
bytenr = btrfs_sb_offset(i);
- ret = btrfs_rmap_block(&root->fs_info->mapping_tree,
- cache->key.objectid, bytenr, 0,
+ ret = btrfs_rmap_block(fs_info, cache->key.objectid, bytenr, 0,
&logical, &nr, &stripe_len);
BUG_ON(ret);
while (nr--) {
@@ -3181,7 +3181,7 @@ static void account_super_bytes(struct btrfs_fs_info *fs_info,
for (i = 0; i < BTRFS_SUPER_MIRROR_MAX; i++) {
bytenr = btrfs_sb_offset(i);
- ret = btrfs_rmap_block(&fs_info->mapping_tree,
+ ret = btrfs_rmap_block(fs_info,
cache->key.objectid, bytenr,
0, &logical, &nr, &stripe_len);
if (ret)
@@ -4180,7 +4180,7 @@ int exclude_super_stripes(struct btrfs_root *root,
for (i = 0; i < BTRFS_SUPER_MIRROR_MAX; i++) {
bytenr = btrfs_sb_offset(i);
- ret = btrfs_rmap_block(&root->fs_info->mapping_tree,
+ ret = btrfs_rmap_block(root->fs_info,
cache->key.objectid, bytenr,
0, &logical, &nr, &stripe_len);
if (ret)