]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: get next entry in tree_search_offset before doing checks
authorNikolay Borisov <nborisov@suse.com>
Mon, 22 Nov 2021 15:16:46 +0000 (17:16 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 3 Jan 2022 14:09:46 +0000 (15:09 +0100)
commit5142868fa30092e5babd76dd337f4e4e78c7fa1c
treef265bcb923886bd8492089a939ce2ea6157217e3
parente08a91e15d61656efdce2726a13f27380f392dbb
btrfs: get next entry in tree_search_offset before doing checks

This is a small optimisation since the currently 'entry' is already
checked in the if () {} else if {} construct above the loop. In essence
the first iteration of the final while loop is redundant. To eliminate
this extra check simply get the next entry at the beginning of the loop.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/free-space-cache.c