Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274672
b: refs/heads/master
c: 068132b
h: refs/heads/master
v: v3
  • Loading branch information
Daniel J Blueman authored and David Sterba committed Oct 20, 2011
1 parent d57bc77 commit 31dda19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 60d2adbb1e7fee1cb4bc67f70bd0bd8ace7b6c3c
refs/heads/master: 068132bad1de70f85f5f6d12c36d64f8f7848d92
8 changes: 6 additions & 2 deletions trunk/fs/btrfs/print-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ static void print_extent_ref_v0(struct extent_buffer *eb, int slot)
void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
{
int i;
u32 type;
u32 nr = btrfs_header_nritems(l);
u32 type, nr;
struct btrfs_item *item;
struct btrfs_root_item *ri;
struct btrfs_dir_item *di;
Expand All @@ -172,6 +171,11 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
struct btrfs_key key;
struct btrfs_key found_key;

if (!l)
return;

nr = btrfs_header_nritems(l);

printk(KERN_INFO "leaf %llu total ptrs %d free space %d\n",
(unsigned long long)btrfs_header_bytenr(l), nr,
btrfs_leaf_free_space(root, l));
Expand Down

0 comments on commit 31dda19

Please sign in to comment.