num_extents is already checked in the next if condition and can
be safely removed.
Signed-off-by: Denis Efremov <[email protected]>
---
fs/btrfs/tests/free-space-tree-tests.c | 2 --
1 file changed, 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)
--
2.26.2
On Mon, Jun 22, 2020 at 11:18:41PM +0300, Denis Efremov wrote:
> num_extents is already checked in the next if condition and can
> be safely removed.
>
> Signed-off-by: Denis Efremov <[email protected]>
Added to misc-next, thanks.