btrfs: qgroup: use qgroup_iterator_nested to in qgroup_update_refcnt()
authorQu Wenruo <wqu@suse.com>
Sat, 2 Sep 2023 00:13:57 +0000 (08:13 +0800)
committerDavid Sterba <dsterba@suse.com>
Thu, 12 Oct 2023 14:44:03 +0000 (16:44 +0200)
commitdce28769a33a95425b007f00842d6e12ffa28f83
tree739c58504c0419d6d6a2de2d9374c0416ab1558f
parenta4a81383fbf8c4e17ea6bbc7f005be98f5ece61b
btrfs: qgroup: use qgroup_iterator_nested to in qgroup_update_refcnt()

The ulist @qgroups is utilized to record all involved qgroups from both
old and new roots inside btrfs_qgroup_account_extent().

Due to the fact that qgroup_update_refcnt() itself is already utilizing
qgroup_iterator, here we have to introduce another list_head,
btrfs_qgroup::nested_iterator, allowing nested iteration.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/qgroup.c
fs/btrfs/qgroup.h