diff options
author | Gu Jinxiang <gujx@cn.fujitsu.com> | 2018-01-26 15:26:01 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-02-02 16:01:57 +0100 |
commit | 3809b36d855fd13aad31c3a426a4d7434180003a (patch) | |
tree | 842de957ad985ea5a19e4c53e80df6bd5d150f95 /print-tree.c | |
parent | 26072f584d347ef2d471c02fbe27dbfedd606ac4 (diff) |
btrfs-progs: Use fs_info instead of root for BTRFS_NODEPTRS_PER_BLOCK
Do a cleanup. Also make it consistent with kernel. Use fs_info instead
of root for BTRFS_NODEPTRS_PER_BLOCK, since maybe in some situation we
do not know root, but just know fs_info.
To be consistent with kernel, change macro to inline function.
Signed-off-by: Gu Jinxiang <gujx@cn.fujitsu.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'print-tree.c')
-rw-r--r-- | print-tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/print-tree.c b/print-tree.c index d3fa8621..5f37ef3e 100644 --- a/print-tree.c +++ b/print-tree.c @@ -1359,7 +1359,7 @@ void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *eb, int fol printf("node %llu level %d items %d free %u generation %llu owner %llu\n", (unsigned long long)eb->start, btrfs_header_level(eb), nr, - (u32)BTRFS_NODEPTRS_PER_BLOCK(root) - nr, + (u32)BTRFS_NODEPTRS_PER_BLOCK(root->fs_info) - nr, (unsigned long long)btrfs_header_generation(eb), (unsigned long long)btrfs_header_owner(eb)); print_uuids(eb); |