]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: allocate path on stack in load_block_group_size_class()
authorFilipe Manana <fdmanana@suse.com>
Tue, 20 Jan 2026 11:55:14 +0000 (11:55 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Feb 2026 06:56:18 +0000 (07:56 +0100)
commite46a9f84bfe8f3662b3ae8ad183d6067888b5469
tree6fdea02e005ed19c7a225bc31783e20dadfa798b
parent17078525e5be48381a35068535feb9adb36635f3
btrfs: allocate path on stack in load_block_group_size_class()

Instead of allocating and freeing a path in every iteration of
load_block_group_size_class(), through its helper function
sample_block_group_extent_item(), allocate the path in the former and
pass it to the later. The path is allocated on stack since it's short
and we are in a workqueue context so there's not much stack usage.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Qu Wenruo <wqu@suse.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