There is no need for an else branch to deal with an unexpected delayed ref
type. We can just change the previous branch to deal with this by checking
if the ref type is not BTRFS_EXTENT_OWNER_REF_KEY, since that branch is
useless as it only sets 'ret' to zero when it's already zero. So merge the
two branches.
Reviewed-by: Boris Burkov <boris@bur.io>
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>
node->type == BTRFS_SHARED_DATA_REF_KEY) {
ret = run_delayed_data_ref(trans, href, node, extent_op,
insert_reserved);
- } else if (node->type == BTRFS_EXTENT_OWNER_REF_KEY) {
- ret = 0;
- } else {
+ } else if (unlikely(node->type != BTRFS_EXTENT_OWNER_REF_KEY)) {
ret = -EUCLEAN;
btrfs_err(fs_info, "unexpected delayed ref node type: %u", node->type);
}