Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07638ea5 authored by Liu Bo's avatar Liu Bo Committed by David Sterba
Browse files

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: default avatarLiu Bo <bo.li.liu@oracle.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 4335958d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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);
	}