summaryrefslogtreecommitdiff
path: root/fs/btrfs/print-tree.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-06-29 19:37:49 +0300
committerDavid Sterba <dsterba@suse.com>2017-08-16 17:12:03 +0300
commita4f78750ef1882e59bb4f947e216cf61ef2d67d2 (patch)
treed262fb16360373142ec08715a7b76118e6fcd26c /fs/btrfs/print-tree.c
parentf1b8a1e8c00a12000e5683f7312f2b1d877717ae (diff)
downloadlinux-a4f78750ef1882e59bb4f947e216cf61ef2d67d2.tar.xz
btrfs: get fs_info from eb in btrfs_print_leaf, remove argument
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/print-tree.c')
-rw-r--r--fs/btrfs/print-tree.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c
index fcae61e175f3..9c3911f4a100 100644
--- a/fs/btrfs/print-tree.c
+++ b/fs/btrfs/print-tree.c
@@ -161,8 +161,9 @@ static void print_uuid_item(struct extent_buffer *l, unsigned long offset,
}
}
-void btrfs_print_leaf(struct btrfs_fs_info *fs_info, struct extent_buffer *l)
+void btrfs_print_leaf(struct extent_buffer *l)
{
+ struct btrfs_fs_info *fs_info;
int i;
u32 type, nr;
struct btrfs_item *item;
@@ -180,6 +181,7 @@ void btrfs_print_leaf(struct btrfs_fs_info *fs_info, struct extent_buffer *l)
if (!l)
return;
+ fs_info = l->fs_info;
nr = btrfs_header_nritems(l);
btrfs_info(fs_info, "leaf %llu total ptrs %d free space %d",
@@ -329,7 +331,7 @@ void btrfs_print_tree(struct btrfs_fs_info *fs_info, struct extent_buffer *c)
nr = btrfs_header_nritems(c);
level = btrfs_header_level(c);
if (level == 0) {
- btrfs_print_leaf(fs_info, c);
+ btrfs_print_leaf(c);
return;
}
btrfs_info(fs_info,