1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-02 13:47:42 +03:00

fix _free_vginfo not to remove a ref to a *different* vginfo from the vgid cache

This commit is contained in:
Alasdair Kergon 2008-06-06 12:43:40 +00:00
parent 6579ad92da
commit e97a07a505

View File

@ -651,7 +651,8 @@ static int _free_vginfo(struct lvmcache_vginfo *vginfo)
if (vginfo->creation_host)
dm_free(vginfo->creation_host);
if (*vginfo->vgid && _vgid_hash)
if (*vginfo->vgid && _vgid_hash &&
vginfo_from_vgid(vginfo->vgid) == vginfo)
dm_hash_remove(_vgid_hash, vginfo->vgid);
list_del(&vginfo->list);