aboutsummaryrefslogtreecommitdiffstats
path: root/qgroup-verify.c
diff options
context:
space:
mode:
authorMark Fasheh <mfasheh@suse.de>2016-06-15 15:50:01 -0700
committerDavid Sterba <dsterba@suse.com>2016-06-17 17:16:44 +0200
commit183995781fdff91ab1af79fcb6d336d934999d84 (patch)
tree2e8420d9dc8cfa6bb875caf3d8d383e112c8be14 /qgroup-verify.c
parent49ec1413a78624d4bf4c99d184c8fbaf99cd0ad4 (diff)
downloadbtrfs-progs-183995781fdff91ab1af79fcb6d336d934999d84.tar.gz
btrfs-progs-183995781fdff91ab1af79fcb6d336d934999d84.tar.xz
btrfs-progs-183995781fdff91ab1af79fcb6d336d934999d84.zip
btrfs-progs: free qgroup counts in btrfsck
Signed-off-by: Mark Fasheh <mfasheh@suse.de> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'qgroup-verify.c')
-rw-r--r--qgroup-verify.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/qgroup-verify.c b/qgroup-verify.c
index 86dcd6d..6ca95eb 100644
--- a/qgroup-verify.c
+++ b/qgroup-verify.c
@@ -1100,6 +1100,19 @@ int report_qgroups(int all)
return ret;
}
+void free_qgroup_counts(void)
+{
+ struct rb_node *node;
+ struct qgroup_count *c;
+ node = rb_first(&counts.root);
+ while (node) {
+ c = rb_entry(node, struct qgroup_count, rb_node);
+ node = rb_next(node);
+ rb_erase(&c->rb_node, &counts.root);
+ free(c);
+ }
+}
+
int qgroup_verify_all(struct btrfs_fs_info *info)
{
int ret;