summaryrefslogtreecommitdiff
path: root/print-tree.c
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2018-03-30 13:48:56 +0800
committerDavid Sterba <dsterba@suse.com>2018-04-24 13:00:11 +0200
commit47c694b0f4afa4fabf1a2013b9f9514a832898f7 (patch)
tree6c1ab83390cae8dfbc7dc1f9d19e851911027028 /print-tree.c
parentf96ca97fb451801d899650a4d03f6a96fa8c59fb (diff)
btrfs-progs: Unify btrfs_leaf_free_space() parameter with kernel
Instead of struct btrfs_root, use struct btrfs_fs_info, since nodesize is now a per-fs setting, and with the need to pass a @root, caller don't need to wonder which root should be passed. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'print-tree.c')
-rw-r--r--print-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/print-tree.c b/print-tree.c
index a2f6bfc0..418ea5b4 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -1190,7 +1190,7 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *eb)
printf("leaf %llu items %d free space %d generation %llu owner ",
(unsigned long long)btrfs_header_bytenr(eb), nr,
- btrfs_leaf_free_space(root, eb),
+ btrfs_leaf_free_space(root->fs_info, eb),
(unsigned long long)btrfs_header_generation(eb));
print_objectid(stdout, btrfs_header_owner(eb), 0);
printf("\n");