]> www.infradead.org Git - users/jedix/linux-maple.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>
Tue, 6 Apr 2021 13:35:52 +0000 (15:35 +0200)
commit7de65130d1d6e32d36ece83f687c394a64b0e02c
tree9d05a983dcf02662593b56b360be85f577f96d79
parent65fac88605a3371b7c051d6963ee198d9a7e5188
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