btrfs: get rid of goto in alloc_test_extent_buffer()

The `free_eb` label is used only once. Simplify by moving the code inplace.

Signed-off-by: Daniel Vacek <neelx@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Daniel Vacek 2025-04-25 09:23:57 +02:00 committed by David Sterba
parent 5e121ae687
commit 13ae88706a

View File

@ -3031,15 +3031,13 @@ struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
goto again;
}
xa_unlock_irq(&fs_info->buffer_tree);
goto free_eb;
btrfs_release_extent_buffer(eb);
return exists;
}
xa_unlock_irq(&fs_info->buffer_tree);
check_buffer_tree_ref(eb);
return eb;
free_eb:
btrfs_release_extent_buffer(eb);
return exists;
#else
/* Stub to avoid linker error when compiled with optimizations turned off. */
return NULL;