]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: add unlikely to critical error in btrfs_extend_item()
authorFilipe Manana <fdmanana@suse.com>
Thu, 13 Nov 2025 13:04:13 +0000 (13:04 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 24 Nov 2025 21:42:25 +0000 (22:42 +0100)
commitfad159f69edabac046c725cdecf22275199b2dd0
tree139328cfcdcf3e85cfb23939d5e9cb7c0a5d969b
parent86d3dc812f1e9aea58fabe8fcd42023f54abcad0
btrfs: add unlikely to critical error in btrfs_extend_item()

It's not expected to get a data size less than the leaf's free space,
which would lead to a leaf dump and BUG(), so tag the if statement's
expression as unlikely, hinting the compiler to potentially generate
better code.

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/ctree.c