btrfs: add cleanup_ref_head_accounting helper
authorJosef Bacik <jbacik@fb.com>
Mon, 3 Dec 2018 15:20:30 +0000 (10:20 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Dec 2018 13:51:46 +0000 (14:51 +0100)
commit07c47775f410168c259494ecb8f62cee0a84ec81
treef55cba26242d2952a7ecf9f1645ecbc6e7d09c15
parentd7baffdaf9f9df8c9715aa507e3be2f409347c74
btrfs: add cleanup_ref_head_accounting helper

We were missing some quota cleanups in check_ref_cleanup, so break the
ref head accounting cleanup into a helper and call that from both
check_ref_cleanup and cleanup_ref_head.  This will hopefully ensure that
we don't screw up accounting in the future for other things that we add.

Reviewed-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Liu Bo <bo.liu@linux.alibaba.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c