]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
btrfs: tree-checker: fix inline ref size in error messages
authorChung-Chiang Cheng <cccheng@synology.com>
Fri, 12 Jan 2024 07:41:05 +0000 (15:41 +0800)
committerDavid Sterba <dsterba@suse.com>
Thu, 18 Jan 2024 22:35:50 +0000 (23:35 +0100)
The error message should accurately reflect the size rather than the
type.

Fixes: f82d1c7ca8ae ("btrfs: tree-checker: Add EXTENT_ITEM and METADATA_ITEM check")
CC: stable@vger.kernel.org # 5.4+
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Chung-Chiang Cheng <cccheng@synology.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tree-checker.c

index 50fdc69fdddf9d26014a65ed73c13fe694d05e4b..6eccf8496486c0630cd85c90ca813170f08e6eb5 100644 (file)
@@ -1436,7 +1436,7 @@ static int check_extent_item(struct extent_buffer *leaf,
                if (unlikely(ptr + btrfs_extent_inline_ref_size(inline_type) > end)) {
                        extent_err(leaf, slot,
 "inline ref item overflows extent item, ptr %lu iref size %u end %lu",
-                                  ptr, inline_type, end);
+                                  ptr, btrfs_extent_inline_ref_size(inline_type), end);
                        return -EUCLEAN;
                }