From a5b6b23c4572694da7b767a04826b06b10712bf0 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 6 Jan 2026 17:20:25 +0100 Subject: [PATCH] btrfs: unify types for binary search variables The variables calculating where to jump next are using mixed in types which requires some conversions on the instruction level. Using 'u32' removes one call to 'movslq', making the main loop shorter. This complements type conversion done in a724f313f84beb ("btrfs: do unsigned integer division in the extent buffer binary search loop") Signed-off-by: David Sterba --- fs/btrfs/ctree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index eae69e205b288..273865bd4be41 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -771,7 +771,7 @@ int btrfs_bin_search(const struct extent_buffer *eb, int first_slot, unsigned long offset; struct btrfs_disk_key *tmp; struct btrfs_disk_key unaligned; - int mid; + u32 mid; mid = (low + high) / 2; offset = p + mid * item_size; -- 2.47.3