From 3809b36d855fd13aad31c3a426a4d7434180003a Mon Sep 17 00:00:00 2001 From: Gu Jinxiang Date: Fri, 26 Jan 2018 15:26:01 +0800 Subject: 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 Reviewed-by: Qu Wenruo Signed-off-by: David Sterba --- print-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'print-tree.c') 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); -- cgit v1.2.3