Skip to content

Commit a5b6b23

Browse files
committed
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 a724f31 ("btrfs: do unsigned integer division in the extent buffer binary search loop") Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 7e1e45a commit a5b6b23

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/btrfs/ctree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ int btrfs_bin_search(const struct extent_buffer *eb, int first_slot,
771771
unsigned long offset;
772772
struct btrfs_disk_key *tmp;
773773
struct btrfs_disk_key unaligned;
774-
int mid;
774+
u32 mid;
775775

776776
mid = (low + high) / 2;
777777
offset = p + mid * item_size;

0 commit comments

Comments
 (0)