btrfs: cleanup the bytenr usage inside btrfs_extent_item_to_extent_map()
authorQu Wenruo <wqu@suse.com>
Tue, 25 Jun 2024 03:55:17 +0000 (13:25 +0930)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Jul 2024 13:33:29 +0000 (15:33 +0200)
commit0edeb6ea46aac9fdd95c6b0990b0359cc7ca5cc1
tree969baf8985204aacd6e58d064eb4f540b0e5fbdd
parent0102ab54e497c8dc6f9d9588aca16500207fdfce
btrfs: cleanup the bytenr usage inside btrfs_extent_item_to_extent_map()

[HICCUP]
Before commit 85de2be7129c ("btrfs: remove extent_map::block_start
member"), we utilized @bytenr variable inside
btrfs_extent_item_to_extent_map() to calculate block_start.

But that commit removed block_start completely, we have no need to
advance @bytenr at all.

[ENHANCEMENT]
- Rename @bytenr as @disk_bytenr
- Only declare @disk_bytenr inside the if branch
- Make @disk_bytenr const and remove the modification on it

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file-item.c