]> git.baikalelectronics.ru Git - kernel.git/commitdiff
btrfs: tests: remove if duplicate in __check_free_space_extents()
authorDenis Efremov <efremov@linux.com>
Mon, 22 Jun 2020 20:18:41 +0000 (23:18 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 27 Jul 2020 10:55:27 +0000 (12:55 +0200)
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>
fs/btrfs/tests/free-space-tree-tests.c

index 914eea5ba6a7adec8d97a76b6971adfa3408b20a..2c783d2f522862d67de80e456aa1609feb2be51e 100644 (file)
@@ -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)