]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: rename free_space_set_bits() and make it less confusing
authorFilipe Manana <fdmanana@suse.com>
Wed, 11 Jun 2025 16:48:28 +0000 (17:48 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 21:58:02 +0000 (23:58 +0200)
commit3887067f55a4ac6f9b2c938efa51f2d582b3925b
tree1a7753c8e45d3d0e23665f121ef88fc1ff9d4321
parent6fc5ef7829887c5a07c733013c6158ec47aa24f9
btrfs: rename free_space_set_bits() and make it less confusing

The free_space_set_bits() is used both to set a range of bits or to clear
range of bits, depending on the 'bit' argument value. So the name is very
misleading since it's not used only to set bits. Furthermore the 'bit'
argument is an integer when a boolean is all that is needed plus its name
is singular, which gives the idea the function operates on a single bit
and not on a range of bits.

So rename the function to free_space_modify_bits(), rename the 'bit'
argument to 'set_bits' and turn the argument to bool instead of int.

Reviewed-by: Boris Burkov <boris@bur.io>
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/free-space-tree.c