diff options
| author | Liu Bo <[email protected]> | 2017-08-18 21:15:21 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2017-08-21 15:47:43 +0000 |
| commit | 07638ea5987e51715b35eb5a9a9e908f18ffabf7 (patch) | |
| tree | 5f2e4f8b97a4c3d5de3eee1e82cbfe0c1aa1aa48 /fs/btrfs/print-tree.c | |
| parent | Btrfs: remove BUG() in btrfs_extent_inline_ref_size (diff) | |
| download | kernel-07638ea5987e51715b35eb5a9a9e908f18ffabf7.tar.gz kernel-07638ea5987e51715b35eb5a9a9e908f18ffabf7.zip | |
Btrfs: remove BUG() in print_extent_item
btrfs_print_leaf() is used in btrfs_get_extent_inline_ref_type, so
here we really want to print the invalid value of ref type instead of
causing a kernel panic.
Signed-off-by: Liu Bo <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/print-tree.c')
| -rw-r--r-- | fs/btrfs/print-tree.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c index 6e7a8c40dcd9..c1acbdcb476c 100644 --- a/fs/btrfs/print-tree.c +++ b/fs/btrfs/print-tree.c @@ -121,7 +121,10 @@ static void print_extent_item(struct extent_buffer *eb, int slot, int type) offset, btrfs_shared_data_ref_count(eb, sref)); break; default: - BUG(); + btrfs_err(eb->fs_info, + "extent %llu has invalid ref type %d", + eb->start, type); + return; } ptr += btrfs_extent_inline_ref_size(type); } |
