diff options
| author | Filipe Manana <fdmanana@suse.com> | 2026-04-01 18:51:35 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-04-07 19:41:42 +0200 |
| commit | 7801f3ea9591cf040f7f92c44f8ec91eaa0d6207 (patch) | |
| tree | 49eb5c7112df952b482c053aac05db2e416f52fc /drivers/char/drm/git@git.tavy.me:linux.git | |
| parent | 3f487be81292702a59ea9dbc4088b3360a50e837 (diff) | |
btrfs: tag as unlikely if statements that check for fs in error state
Having the filesystem in an error state, meaning we had a transaction
abort, is unexpected. Mark every check for the error state with the
unlikely annotation to convey that and to allow the compiler to generate
better code.
On x86_64, using gcc 14.2.0-19 from Debian, resulted in a slightly
reduced object size and better code.
Before:
$ size fs/btrfs/btrfs.ko
text data bss dec hex filename
2008598 175912 15592 2200102 219226 fs/btrfs/btrfs.ko
After:
$ size fs/btrfs/btrfs.ko
text data bss dec hex filename
2008450 175912 15592 2199954 219192 fs/btrfs/btrfs.ko
Reviewed-by: Anand Jain <asj@kernel.org>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'drivers/char/drm/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
