btrfs: cleanup the main loop in btrfs_lookup_bio_sums
authorChristoph Hellwig <hch@lst.de>
Wed, 22 Feb 2023 17:07:02 +0000 (09:07 -0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Apr 2023 16:01:16 +0000 (18:01 +0200)
commite2eb02480c5407cc918f2dd90ee856bd2e549465
treea38956b540dc1f88cc13adeb08d8f693907bee98
parent65886d2b1fd42cd9e8b0540782078591e8752012
btrfs: cleanup the main loop in btrfs_lookup_bio_sums

Introduce a bio_offset variable for the current offset into the bio
instead of recalculating it over and over.   Remove the now only used
once search_len and sector_offset variables, and reduce the scope for
count and cur_disk_bytenr.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file-item.c