]> www.infradead.org Git - users/dwmw2/linux.git/commit
btrfs: simplify add_extent_mapping() by removing pointless label
authorFilipe Manana <fdmanana@suse.com>
Tue, 16 Jan 2024 16:00:16 +0000 (16:00 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 May 2024 19:31:04 +0000 (21:31 +0200)
commited48adf83e09041d7ec3ec9ef256f1b3f660c52d
tree203d090305555a4c526c2590aca64b6c1e8f9f5b
parent071533da5f2e7623089e69252bd949610d6c8194
btrfs: simplify add_extent_mapping() by removing pointless label

The add_extent_mapping() function is short and trivial, there's no need to
have a label for a quick exit in case of an error, even because there's no
error handling needed, we just need to return the error. So remove that
label and return directly.

Also while at it remove the redundant initialization of 'ret', as that may
help avoid some warnings with clang tools such as the one reported/fixed
by commit 966de47ff0c9 ("btrfs: remove redundant initialization of
variables in log_new_ancestors").

Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_map.c