mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-24 02:18:54 +00:00
dm thin metadata: delete btrees when releasing metadata snapshot
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> Cc: stable@vger.kernel.org
This commit is contained in:
parent
f7644cbfcd
commit
7f518ad0a2
@ -1293,8 +1293,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);
|
||||
|
Loading…
Reference in New Issue
Block a user