Skip to content

Commit

Permalink
btrfs: tests: remove if duplicate in __check_free_space_extents()
Browse files Browse the repository at this point in the history
num_extents is already checked in the next if condition and can
be safely removed.

Signed-off-by: Denis Efremov <efremov@linux.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Denis Efremov authored and David Sterba committed Jul 27, 2020
1 parent 923eb52 commit 5af9d6e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/btrfs/tests/free-space-tree-tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ static int __check_free_space_extents(struct btrfs_trans_handle *trans,
if (prev_bit == 0 && bit == 1) {
extent_start = offset;
} else if (prev_bit == 1 && bit == 0) {
if (i >= num_extents)
goto invalid;
if (i >= num_extents ||
extent_start != extents[i].start ||
offset - extent_start != extents[i].length)
Expand Down

0 comments on commit 5af9d6e

Please sign in to comment.