btrfs: refactor __btrfs_run_delayed_refs loop
authorNikolay Borisov <nborisov@suse.com>
Wed, 15 Aug 2018 07:39:56 +0000 (10:39 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 15 Oct 2018 15:23:35 +0000 (17:23 +0200)
commit0110a4c43451533de1ea1bbdc57b5d452f9d8b25
tree1ed4551c8b68165b79091e18260f0db80dc963b0
parente726138676f896146a55a98305665e81d34d038c
btrfs: refactor __btrfs_run_delayed_refs loop

Refactor the delayed refs loop by using the newly introduced
btrfs_run_delayed_refs_for_head function. This greatly simplifies
__btrfs_run_delayed_refs and makes it more obvious what is happening.

We now have 1 loop which iterates the existing delayed_heads and then
each selected ref head is processed by the new helper. All existing
semantics of the code are preserved so 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/extent-tree.c