From: Daniel Vacek Date: Fri, 25 Apr 2025 07:23:57 +0000 (+0200) Subject: btrfs: get rid of goto in alloc_test_extent_buffer() X-Git-Tag: block-6.16-20250606~42^2~79 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=13ae88706a8c3db412ba7a7a07dcc55e8f1eb53c;p=linux-block.git 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 Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index a3f7e036437a..8467b0128c93 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3031,15 +3031,13 @@ again: 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;