mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-11 20:58:50 +03:00
fix _free_vginfo not to remove a ref to a *different* vginfo from the vgid cache
This commit is contained in:
parent
d0de492ff3
commit
f0dfe9dcda
3
lib/cache/lvmcache.c
vendored
3
lib/cache/lvmcache.c
vendored
@ -651,7 +651,8 @@ static int _free_vginfo(struct lvmcache_vginfo *vginfo)
|
|||||||
if (vginfo->creation_host)
|
if (vginfo->creation_host)
|
||||||
dm_free(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);
|
dm_hash_remove(_vgid_hash, vginfo->vgid);
|
||||||
|
|
||||||
list_del(&vginfo->list);
|
list_del(&vginfo->list);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user