]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: remove stripe size local variable from insert_dev_extents()
authorFilipe Manana <fdmanana@suse.com>
Tue, 21 Nov 2023 13:38:39 +0000 (13:38 +0000)
committerDavid Sterba <dsterba@suse.com>
Fri, 15 Dec 2023 19:27:02 +0000 (20:27 +0100)
commit71fca47b644910485c49d1da31bc963cf286fe77
tree2369b3cde53f7bfd547283224b2e4e0e7c097264
parent7dc66abb5a47778d7db327783a0ba172b8cff0b5
btrfs: remove stripe size local variable from insert_dev_extents()

It's not needed to have a local variable to store the stripe size at
insert_dev_extents(), we can just take from the chunk map as it's only
used once and typing 'map->stripe_size' is not much more verbose than
simply typing 'stripe_size'. So remove the local variable.

This was added before the recent addition of a dedicated structure for
chunk mappings because the stripe size was encoded in the 'orig_block_len'
field of an extent_map structure, so the use of the local variable made
things more readable.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c