btrfs: Factor out ref head locking code in __btrfs_run_delayed_refs
authorNikolay Borisov <nborisov@suse.com>
Wed, 15 Aug 2018 07:39:54 +0000 (10:39 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 15 Oct 2018 15:23:34 +0000 (17:23 +0200)
commitb1cdbcb53a6edd84d50b72117d49a350575bbe6a
tree2feca4dbba95ee7d382768b7ef21bbe630865129
parentb2fa11547bc1693a8dd8e7379dd4e43d31f49c50
btrfs: Factor out ref head locking code in __btrfs_run_delayed_refs

This is in preparation to refactor the giant loop in
__btrfs_run_delayed_refs. As a first step define a new function
which implements acquiring a reference to a btrfs_delayed_refs_head and
use it. 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