summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2015-08-12 15:10:21 +0100
committerJiri Slaby <jslaby@suse.cz>2015-08-25 16:57:09 +0200
commit1d124d81dfdb65173dd291d3b33e4bfb9c4cb624 (patch)
tree102273246dcb8125eca4ea3a99a404cd7ecfab29
parent78010f59a4d0a3f311d347671114a1c6e6f4988d (diff)
downloadlwn-1d124d81dfdb65173dd291d3b33e4bfb9c4cb624.tar.gz
lwn-1d124d81dfdb65173dd291d3b33e4bfb9c4cb624.zip
dm thin metadata: delete btrees when releasing metadata snapshot
commit 7f518ad0a212e2a6fd68630e176af1de395070a7 upstream. The device details and mapping trees were just being decremented before. Now btree_del() is called to do a deep delete. Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
-rw-r--r--drivers/md/dm-thin-metadata.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c
index b63095c73b5f..7e3da70ed646 100644
--- a/drivers/md/dm-thin-metadata.c
+++ b/drivers/md/dm-thin-metadata.c
@@ -1295,8 +1295,8 @@ static int __release_metadata_snap(struct dm_pool_metadata *pmd)
return r;
disk_super = dm_block_data(copy);
- dm_sm_dec_block(pmd->metadata_sm, le64_to_cpu(disk_super->data_mapping_root));
- dm_sm_dec_block(pmd->metadata_sm, le64_to_cpu(disk_super->device_details_root));
+ dm_btree_del(&pmd->info, le64_to_cpu(disk_super->data_mapping_root));
+ dm_btree_del(&pmd->details_info, le64_to_cpu(disk_super->device_details_root));
dm_sm_dec_block(pmd->metadata_sm, held_root);
return dm_tm_unlock(pmd->tm, copy);