]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: add missing unlikely to if branches leading to a DEBUG_WARN()
authorFilipe Manana <fdmanana@suse.com>
Thu, 23 Apr 2026 11:31:46 +0000 (12:31 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 8 Jun 2026 13:53:30 +0000 (15:53 +0200)
commitd54d38fed95099e742a58648022feb66ecd85e40
treec0db5d32345843e368e10a21e9c1a5198cd5e302
parent4c45ac362324262d03c66a19d5e9670b99afc94c
btrfs: add missing unlikely to if branches leading to a DEBUG_WARN()

If statement branches that lead to a DEBUG_WARN() are unexpected to happen
and in most places we surround their expressions with the unlikely tag,
however a few places are missing. Add the unlikely tag to those missing
places to make it explicit to a reader that it's not expected and to hint
the compiler to 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/block-group.c
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/free-space-tree.c
fs/btrfs/inode.c
fs/btrfs/qgroup.c
fs/btrfs/volumes.c