]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: move all ref head cleanup to the helper function
authorJosef Bacik <josef@toxicpanda.com>
Fri, 29 Sep 2017 19:43:56 +0000 (15:43 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 30 Oct 2017 11:28:00 +0000 (12:28 +0100)
commitf1cc797fc671e55ff6a92e40468e41053f0fde45
treed2a1305a69deda2a95f8fcdce39df555ceaf9367
parentc890abf46ed3d579c745b15f701b5fee15253e9a
btrfs: move all ref head cleanup to the helper function

We do a couple different cleanup operations on the ref head.  We adjust
counters, we'll free any reserved space if we didn't end up using the
ref, and we clear the pending csum bytes.  Move all these disparate
things into cleanup_ref_head and clean up the logic in
__btrfs_run_delayed_refs so that it handles the !ref case a lot cleaner,
as well as making run_one_delayed_ref() only deal with real refs and not
the ref head.

Signed-off-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c