summaryrefslogtreecommitdiff
path: root/fs/btrfs/tests/free-space-tree-tests.c
diff options
context:
space:
mode:
authorDenis Efremov <efremov@linux.com>2020-06-22 23:18:41 +0300
committerDavid Sterba <dsterba@suse.com>2020-07-27 13:55:27 +0300
commit5af9d6ef3f6fe62c60f23ef3fd437e0843bea679 (patch)
tree708a3b7bfd588ec6c23dfdb31afefb3ebadad4ae /fs/btrfs/tests/free-space-tree-tests.c
parent923eb5236597c90b11114926025e0c04e4c1da32 (diff)
downloadlinux-5af9d6ef3f6fe62c60f23ef3fd437e0843bea679.tar.xz
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: Denis Efremov <efremov@linux.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tests/free-space-tree-tests.c')
-rw-r--r--fs/btrfs/tests/free-space-tree-tests.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/tests/free-space-tree-tests.c b/fs/btrfs/tests/free-space-tree-tests.c
index 914eea5ba6a7..2c783d2f5228 100644
--- a/fs/btrfs/tests/free-space-tree-tests.c
+++ b/fs/btrfs/tests/free-space-tree-tests.c
@@ -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)