]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: replace open coded while loop with proper construct
authorNikolay Borisov <nborisov@suse.com>
Wed, 17 Feb 2021 13:12:50 +0000 (15:12 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Apr 2021 15:25:14 +0000 (17:25 +0200)
commit4bc598cd525bfeda8ab8cc58f839950fea70fe76
tree170d45e5cbe53b7708a6c6a751c6d2cf1d3e9904
parentb63442fe3021b7ec4e3d4f05b3afa0f4c1a589ed
btrfs: replace open coded while loop with proper construct

btrfs_inc_block_group_ro wants to ensure that the current transaction is
not running dirty block groups, if it is it waits and loops again.
That logic is currently implemented using a goto label. Actually using
a proper do {} while() construct doesn't hurt readability nor does it
introduce excessive nesting and makes the relevant code stand out by
being encompassed in the loop construct. No functional changes.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c