mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 13:06:59 +02:00
btrfs: remove duplicate error check at btrfs_convert_extent_bit()
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:
parent
f2a24bef55
commit
5f9c554a6c
|
|
@ -1389,11 +1389,11 @@ int btrfs_convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
|
|||
goto out;
|
||||
}
|
||||
ret = split_state(tree, state, prealloc, start);
|
||||
if (ret)
|
||||
extent_io_tree_panic(tree, state, "split", ret);
|
||||
prealloc = NULL;
|
||||
if (ret)
|
||||
if (ret) {
|
||||
extent_io_tree_panic(tree, state, "split", ret);
|
||||
goto out;
|
||||
}
|
||||
if (state->end <= end) {
|
||||
set_state_bits(tree, state, bits, NULL);
|
||||
cache_state(state, cached_state);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user