Skip to content

Commit

Permalink
btrfs: get fs_info from eb in btrfs_print_tree, remove argument
Browse files Browse the repository at this point in the history
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
kdave committed Aug 16, 2017
1 parent a4f7875 commit abe60ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions fs/btrfs/print-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
struct btrfs_key key;
int level;

if (!c)
return;
fs_info = c->fs_info;
nr = btrfs_header_nritems(c);
level = btrfs_header_level(c);
if (level == 0) {
Expand Down Expand Up @@ -361,7 +363,7 @@ void btrfs_print_tree(struct btrfs_fs_info *fs_info, struct extent_buffer *c)
if (btrfs_header_level(next) !=
level - 1)
BUG();
btrfs_print_tree(fs_info, next);
btrfs_print_tree(next);
free_extent_buffer(next);
}
}
2 changes: 1 addition & 1 deletion fs/btrfs/print-tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
#ifndef __PRINT_TREE_
#define __PRINT_TREE_
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

0 comments on commit abe60ba

Please sign in to comment.