]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: use local variable for space_info in pin_down_extent()
authorFilipe Manana <fdmanana@suse.com>
Mon, 20 Oct 2025 12:40:56 +0000 (13:40 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 24 Nov 2025 21:15:58 +0000 (22:15 +0100)
commitec8022cd2656935bdf0be13110c1a27dfe154aaf
treec38d3bd6f0d3849fd236ade553318ce78a757296
parent585416766d2711d0bcc328f54bff392f5e865ffa
btrfs: use local variable for space_info in pin_down_extent()

Instead of dereferencing the block group multiple times to access its
space_info, use a local variable to shorten the code horizontal wise and
make it easier to read. Also, while at it, also rename the block group
argument from 'cache' to 'bg', as the cache name is confusing and it's
from the old days where the block group structure was named as
'btrfs_block_group_cache'.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.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/extent-tree.c