Commit abe60ba4 authored by David Sterba's avatar David Sterba

btrfs: get fs_info from eb in btrfs_print_tree, remove argument

Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent a4f78750
...@@ -320,14 +320,16 @@ void btrfs_print_leaf(struct extent_buffer *l) ...@@ -320,14 +320,16 @@ void btrfs_print_leaf(struct extent_buffer *l)
} }
} }
void btrfs_print_tree(struct btrfs_fs_info *fs_info, struct extent_buffer *c) void btrfs_print_tree(struct extent_buffer *c)
{ {
struct btrfs_fs_info *fs_info;
int i; u32 nr; int i; u32 nr;
struct btrfs_key key; struct btrfs_key key;
int level; int level;
if (!c) if (!c)
return; return;
fs_info = c->fs_info;
nr = btrfs_header_nritems(c); nr = btrfs_header_nritems(c);
level = btrfs_header_level(c); level = btrfs_header_level(c);
if (level == 0) { if (level == 0) {
...@@ -361,7 +363,7 @@ void btrfs_print_tree(struct btrfs_fs_info *fs_info, struct extent_buffer *c) ...@@ -361,7 +363,7 @@ void btrfs_print_tree(struct btrfs_fs_info *fs_info, struct extent_buffer *c)
if (btrfs_header_level(next) != if (btrfs_header_level(next) !=
level - 1) level - 1)
BUG(); BUG();
btrfs_print_tree(fs_info, next); btrfs_print_tree(next);
free_extent_buffer(next); free_extent_buffer(next);
} }
} }
...@@ -19,5 +19,5 @@ ...@@ -19,5 +19,5 @@
#ifndef __PRINT_TREE_ #ifndef __PRINT_TREE_
#define __PRINT_TREE_ #define __PRINT_TREE_
void btrfs_print_leaf(struct extent_buffer *l); void btrfs_print_leaf(struct extent_buffer *l);
void btrfs_print_tree(struct btrfs_fs_info *fs_info, struct extent_buffer *c); void btrfs_print_tree(struct extent_buffer *c);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment