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:
parent
6579ad92da
commit
e97a07a505
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)
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user