diff options
| author | Filipe Manana <fdmanana@suse.com> | 2026-06-05 17:25:50 +0100 |
|---|---|---|
| committer | Johannes Thumshirn <johannes.thumshirn@wdc.com> | 2026-06-09 18:22:47 +0200 |
| commit | 50c134f2a9eac39373d937785d18e4386f48532b (patch) | |
| tree | e161d4ff2f56ba50f16bbb9a5ee9944a2b02049c /include/linux/timerqueue_types.h | |
| parent | f51228e1bac7082ba016010c7c9eff41ccd4169d (diff) | |
btrfs: move WARN_ON on unexpected error in __add_tree_block()
There's no point in having the WARN_ON(1) inside the if statement for the
unexpected error. Move it into the if statement's condition, which brings
a couple benefits:
1) It marks the branch as unlikely, hinting the compiler to generate
better code;
2) The WARN_ON() produces a stack trace after the dumped leaf and error
message which can hide that more important information in case we get
a truncated dmesg/syslog.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/linux/timerqueue_types.h')
0 files changed, 0 insertions, 0 deletions
