summaryrefslogtreecommitdiff
path: root/check/mode-lowmem.c
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2018-04-30 11:15:43 +0800
committerDavid Sterba <dsterba@suse.com>2018-06-07 16:37:35 +0200
commit41750fe660cd51ca318976761c1938fa70d7ffa2 (patch)
tree35fe07fe722312dd21e2d13869349188c3db45ca /check/mode-lowmem.c
parenteb7b42003a7d3a1d4c0253c6d5a248c9078c6d19 (diff)
btrfs-progs: Remove fs_info parameter from btrfs_leaf_free_space()
For btrfs_leaf_free_space(), to get leaf data size, we have two way to get it: 1) leaf->fs_info->nodesize 2) leaf->len Anyway, we could get rid of @fs_info parameter for btrfs_leaf_free_space(). And here we choose method 2), as it provides extra benefit to get leaf free space without initializing a real fs_info. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'check/mode-lowmem.c')
-rw-r--r--check/mode-lowmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
index f99ce72b..9890180d 100644
--- a/check/mode-lowmem.c
+++ b/check/mode-lowmem.c
@@ -730,7 +730,7 @@ static void account_bytes(struct btrfs_root *root, struct btrfs_path *path,
total_extent_tree_bytes += eb->len;
if (level == 0) {
- btree_space_waste += btrfs_leaf_free_space(root->fs_info, eb);
+ btree_space_waste += btrfs_leaf_free_space(eb);
} else {
free_nrs = (BTRFS_NODEPTRS_PER_BLOCK(root->fs_info) -
btrfs_header_nritems(eb));