diff options
author | Joe Thornber <ejt@redhat.com> | 2015-08-12 15:10:21 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-13 09:07:59 -0700 |
commit | 9cdd5586f1e836ffd877c79c74240ee46fea5bd3 (patch) | |
tree | 0f72438a27ead0700191f4d38f890bade5b02651 | |
parent | 1f6661e25639001c9fb5922affe9392b3729fff9 (diff) | |
download | lwn-9cdd5586f1e836ffd877c79c74240ee46fea5bd3.tar.gz lwn-9cdd5586f1e836ffd877c79c74240ee46fea5bd3.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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/md/dm-thin-metadata.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c index 3b1503dc1f13..43f6250baadd 100644 --- a/drivers/md/dm-thin-metadata.c +++ b/drivers/md/dm-thin-metadata.c @@ -1281,8 +1281,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); |