]> 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)
commit83f217d436647155fe5f6fcdfaaa2c6d33cdcb2b
treed2a1305a69deda2a95f8fcdce39df555ceaf9367
parentc55e461b6d1e9af9f0eeae2234172090347e7068
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