]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: process inline extent earlier in replay_one_extent()
authorFilipe Manana <fdmanana@suse.com>
Mon, 21 Jul 2025 12:41:15 +0000 (13:41 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Sep 2025 08:54:30 +0000 (10:54 +0200)
commit575f52a77a0aa045943cca67fdf9f0388e86a5f8
treeccd693563865a0b21351fe94c25d66ec552dd1fc
parent88666b6df97ec3ac8e6522584bec4963cf7ce6f8
btrfs: process inline extent earlier in replay_one_extent()

Instead of having an if statement to check for regular and prealloc
extents first, process them in a block, and then following with an else
statement to check for an inline extent, check for an inline extent first,
process it and jump to the 'update_inode' label, allowing us to avoid
having the code for processing regular and prealloc extents inside a
block, reducing the high indentation level by one and making the code
easier to read and avoid line splittings too.

Reviewed-by: Boris Burkov <boris@bur.io>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tree-log.c