diff options
author | Filipe Manana <fdmanana@suse.com> | 2023-04-05 19:52:23 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-04-17 19:52:19 +0200 |
commit | 524f14bb114a20d9b3d8db25f93b532d4207fcac (patch) | |
tree | 15a76b2ca1e18a4f5718a5db09596f4031e5fed2 /fs/btrfs/scrub.c | |
parent | btrfs: scrub: reject unsupported scrub flags (diff) | |
download | linux-524f14bb114a20d9b3d8db25f93b532d4207fcac.tar.xz linux-524f14bb114a20d9b3d8db25f93b532d4207fcac.zip |
btrfs: remove pointless loop at btrfs_get_next_valid_item()
It's pointless to have a while loop at btrfs_get_next_valid_item(), as if
the slot on the current leaf is beyond the last item, we call
btrfs_next_leaf(), which leaves us at a valid slot of the next leaf (or
a valid slot in the current leaf if after releasing the path an item gets
pushed from the next leaf to the current leaf).
So just call btrfs_next_leaf() if the current slot on the current leaf is
beyond the last item.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/scrub.c')
0 files changed, 0 insertions, 0 deletions