projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a2d8e1
)
Btrfs-progs: fix segmentation fault of 'btrfs-debug-tree -e'
author
Liu Bo
<bo.li.liu@oracle.com>
Mon, 18 Feb 2013 10:05:17 +0000
(18:05 +0800)
committer
David Sterba
<dsterba@suse.cz>
Tue, 19 Feb 2013 10:42:03 +0000
(11:42 +0100)
Due to some historical reasons, we remove 'printing leaf' part, which'd
lead to 'Segmentation fault' of btrfs-debug-tree -e, this patch adds it
back.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
debug-tree.c
patch
|
blob
|
history
diff --git
a/debug-tree.c
b/debug-tree.c
index
f6bd5d8
..
02b0389
100644
(file)
--- a/
debug-tree.c
+++ b/
debug-tree.c
@@
-52,6
+52,11
@@
static void print_extents(struct btrfs_root *root, struct extent_buffer *eb)
if (!eb)
return;
+ if (btrfs_is_leaf(eb)) {
+ btrfs_print_leaf(root, eb);
+ return;
+ }
+
size = btrfs_level_size(root, btrfs_header_level(eb) - 1);
nr = btrfs_header_nritems(eb);
for (i = 0; i < nr; i++) {