diff options
| author | Filipe Manana <fdmanana@suse.com> | 2025-04-10 16:40:29 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-05-15 14:30:51 +0200 |
| commit | 5f9c554a6c1219dee1a3484db2e19881d35a0788 (patch) | |
| tree | 2219759e4cc5f44d54bfbf2a3a038bbee53a3a25 /fs/btrfs/extent-io-tree.c | |
| parent | f2a24bef553891d91d3ae1745b748cdf5cc58145 (diff) | |
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>
Diffstat (limited to 'fs/btrfs/extent-io-tree.c')
| -rw-r--r-- | fs/btrfs/extent-io-tree.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/extent-io-tree.c b/fs/btrfs/extent-io-tree.c index 55334c616d6d..2c004e0c431d 100644 --- a/fs/btrfs/extent-io-tree.c +++ b/fs/btrfs/extent-io-tree.c @@ -1389,11 +1389,11 @@ hit_next: 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); |
