]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: use btrfs_next_item() at scrub.c:find_first_extent_item()
authorFilipe Manana <fdmanana@suse.com>
Tue, 21 Nov 2023 13:38:37 +0000 (13:38 +0000)
committerDavid Sterba <dsterba@suse.com>
Fri, 15 Dec 2023 19:27:02 +0000 (20:27 +0100)
commitebb0beca6c6a2d33f809a74bad63261651237833
tree7bbb3da7ed3f186b28c09da660292dd5f33aa001
parent2ecec0d6a5b5817edf50fe80196ca774e72dae46
btrfs: use btrfs_next_item() at scrub.c:find_first_extent_item()

There's no reason to open code what btrfs_next_item() does when searching
for extent items at scrub.c:scrub.c:find_first_extent_item(), so remove
the logic to find the next item and use btrfs_next_item() instead, making
the code shorter and less nested code blocks. While at it also fix the
comment to the plural "items" instead of "item" and end it with proper
punctuation.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/scrub.c