diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2017-06-13 17:19:17 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-07-12 17:52:09 +0200 |
commit | 3e611c698386db7d8ec998caf3ee0ce5b40d1e9b (patch) | |
tree | e37d674501991b0a9647bfd85633f9edeb262585 /extent_io.c | |
parent | d39731a53bb6212effc184719296e39f5200ee94 (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_io.c')
-rw-r--r-- | extent_io.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/extent_io.c b/extent_io.c index 26a67865..1c6c1425 100644 --- a/extent_io.c +++ b/extent_io.c @@ -698,8 +698,8 @@ int read_data_from_disk(struct btrfs_fs_info *info, void *buf, u64 offset, while (bytes_left) { read_len = bytes_left; - ret = btrfs_map_block(&info->mapping_tree, READ, offset, - &read_len, &multi, mirror, NULL); + ret = btrfs_map_block(info, READ, offset, &read_len, &multi, + mirror, NULL); if (ret) { fprintf(stderr, "Couldn't map the block %Lu\n", offset); @@ -752,8 +752,8 @@ int write_data_to_disk(struct btrfs_fs_info *info, void *buf, u64 offset, this_len = bytes_left; dev_nr = 0; - ret = btrfs_map_block(&info->mapping_tree, WRITE, offset, - &this_len, &multi, mirror, &raid_map); + ret = btrfs_map_block(info, WRITE, offset, &this_len, &multi, + mirror, &raid_map); if (ret) { fprintf(stderr, "Couldn't map the block %Lu\n", offset); |