summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/print-tree.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2018-06-26 16:20:59 +0200
committerDavid Sterba <dsterba@suse.com>2018-08-06 13:12:41 +0200
commit6d8ff4e4584cd84093b751671351c8103ead551d (patch)
tree55eace14bd7e22ae9098354b101357d859c6b886 /fs/btrfs/print-tree.c
parentbtrfs: Add graceful handling of V0 extents (diff)
downloadlinux-6d8ff4e4584cd84093b751671351c8103ead551d.tar.xz
linux-6d8ff4e4584cd84093b751671351c8103ead551d.zip
btrfs: annotate unlikely branches after V0 extent type removal
The v0 extent type checks are the right case for the unlikely annotations as we don't expect to ever see them, so let's give the compiler some hint. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/print-tree.c')
-rw-r--r--fs/btrfs/print-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c
index cc945376c244..df49931ffe92 100644
--- a/fs/btrfs/print-tree.c
+++ b/fs/btrfs/print-tree.c
@@ -52,7 +52,7 @@ static void print_extent_item(struct extent_buffer *eb, int slot, int type)
u64 offset;
int ref_index = 0;
- if (item_size < sizeof(*ei)) {
+ if (unlikely(item_size < sizeof(*ei))) {
btrfs_print_v0_err(eb->fs_info);
btrfs_handle_fs_error(eb->fs_info, -EINVAL, NULL);
}