mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-31 21:18:26 +03:00
Do not try to unlock VG which is not locked.
If the vg_read() returned error, no lock was taken, so always call vg_release(). Otherwise this can happen because of missing FAILED_*: # vgchange -a y x --ignorelockingfailure Volume group "x" not found Internal error: Attempt to unlock unlocked VG x
This commit is contained in:
parent
cd501dd440
commit
0025670dc9
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.56 -
|
Version 2.02.56 -
|
||||||
====================================
|
====================================
|
||||||
|
Do not try to unlock VG which is not locked in _process_one_vg.
|
||||||
Move persistent filter dump to more appropriate place.
|
Move persistent filter dump to more appropriate place.
|
||||||
Refresh device filters before full device rescan in lvmcache.
|
Refresh device filters before full device rescan in lvmcache.
|
||||||
Return error status if vgchange fails to activate some volume.
|
Return error status if vgchange fails to activate some volume.
|
||||||
|
@ -452,8 +452,7 @@ static int _process_one_vg(struct cmd_context *cmd, const char *vg_name,
|
|||||||
ret_max = ret;
|
ret_max = ret;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if ((vg_read_error(vg) == FAILED_ALLOCATION)||
|
if (vg_read_error(vg))
|
||||||
(vg_read_error(vg) == FAILED_LOCKING))
|
|
||||||
vg_release(vg);
|
vg_release(vg);
|
||||||
else
|
else
|
||||||
unlock_and_release_vg(cmd, vg, vg_name);
|
unlock_and_release_vg(cmd, vg, vg_name);
|
||||||
|
Loading…
Reference in New Issue
Block a user