mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-13 10:50:40 -04:00
btrfs: remove duplicate error check at btrfs_clear_extent_bit_changeset()
There's no need to check if split_state() returned an error twice, instead unify into a single if statement after setting 'prealloc' to NULL, because on error split_state() frees the 'prealloc' extent state record. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
committed by
David Sterba
parent
007fa63225
commit
f389e7b982
@@ -691,12 +691,11 @@ int btrfs_clear_extent_bit_changeset(struct extent_io_tree *tree, u64 start, u64
|
||||
if (!prealloc)
|
||||
goto search_again;
|
||||
err = split_state(tree, state, prealloc, start);
|
||||
if (err)
|
||||
extent_io_tree_panic(tree, state, "split", err);
|
||||
|
||||
prealloc = NULL;
|
||||
if (err)
|
||||
if (err) {
|
||||
extent_io_tree_panic(tree, state, "split", err);
|
||||
goto out;
|
||||
}
|
||||
if (state->end <= end) {
|
||||
state = clear_state_bit(tree, state, bits, wake, changeset);
|
||||
goto next;
|
||||
|
||||
Reference in New Issue
Block a user