]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: decrease indentation of find_free_extent_update_loop
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Wed, 18 Mar 2026 07:17:00 +0000 (08:17 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 Apr 2026 16:56:05 +0000 (18:56 +0200)
commit390aa432f3268c0947f903ab2d60ae2c7cafd11b
tree9c7067d6f0fb473e36aa64e9660b7726d42c9108
parent9a04488473102f08f078653de51bb0b8291087aa
btrfs: decrease indentation of find_free_extent_update_loop

Decrease the indentation of find_free_extent_update_loop(), by inverting
the check if the loop state is smaller than LOOP_NO_EMPTY_SIZE.

This also allows for an early return from find_free_extent_update_loop(),
in case LOOP_NO_EMPTY_SIZE is already set at this point.

While at it change a

    if () {
    }
    else if
    else

pattern to all using curly braces and be consistent with the rest of btrfs
code.

Also change 'int exists' to 'bool have_trans' giving it a more meaningful
name and type.

No functional changes intended.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c