Commit a5b6b23c authored by David Sterba's avatar David Sterba
Browse files

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 a724f313 ("btrfs: do
unsigned integer division in the extent buffer binary search loop")

Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 7e1e45a9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;