Commit 5af9d6ef authored by Denis Efremov's avatar Denis Efremov Committed by David Sterba

btrfs: tests: remove if duplicate in __check_free_space_extents()

num_extents is already checked in the next if condition and can
be safely removed.
Signed-off-by: default avatarDenis Efremov <efremov@linux.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 923eb523
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment