diff --git a/fs/btrfs/extent-io-tree.c b/fs/btrfs/extent-io-tree.c index 68e48b493950..93dca9199249 100644 --- a/fs/btrfs/extent-io-tree.c +++ b/fs/btrfs/extent-io-tree.c @@ -696,7 +696,7 @@ int btrfs_clear_extent_bit_changeset(struct extent_io_tree *tree, u64 start, u64 goto search_again; ret = split_state(tree, state, prealloc, start); prealloc = NULL; - if (ret) { + if (unlikely(ret)) { extent_io_tree_panic(tree, state, "split", ret); goto out; } @@ -762,7 +762,7 @@ int btrfs_clear_extent_bit_changeset(struct extent_io_tree *tree, u64 start, u64 if (!prealloc) goto search_again; ret = split_state(tree, state, prealloc, end + 1); - if (ret) { + if (unlikely(ret)) { extent_io_tree_panic(tree, state, "split", ret); prealloc = NULL; goto out; @@ -1203,7 +1203,7 @@ static int set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, if (!prealloc) goto search_again; ret = split_state(tree, state, prealloc, start); - if (ret) + if (unlikely(ret)) extent_io_tree_panic(tree, state, "split", ret); prealloc = NULL; @@ -1293,7 +1293,7 @@ static int set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, if (!prealloc) goto search_again; ret = split_state(tree, state, prealloc, end + 1); - if (ret) { + if (unlikely(ret)) { extent_io_tree_panic(tree, state, "split", ret); prealloc = NULL; goto out; @@ -1448,7 +1448,7 @@ int btrfs_convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, } ret = split_state(tree, state, prealloc, start); prealloc = NULL; - if (ret) { + if (unlikely(ret)) { extent_io_tree_panic(tree, state, "split", ret); goto out; } @@ -1532,7 +1532,7 @@ int btrfs_convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, } ret = split_state(tree, state, prealloc, end + 1); - if (ret) { + if (unlikely(ret)) { extent_io_tree_panic(tree, state, "split", ret); prealloc = NULL; goto out;