1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-22 06:50:52 +03:00

vg_read: correct error path for DM cache update

New code for updating DM cache traveled through couple destination
however in this place only 'return_0' is missing unlocking in
error path.
This commit is contained in:
Zdenek Kabelac 2025-01-30 19:55:21 +01:00
parent 2c63b12bd3
commit 46a48f1320

View File

@ -5017,8 +5017,11 @@ struct volume_group *vg_read(struct cmd_context *cmd, const char *vg_name, const
* TODO: do a lazy-update of this cache, only when it's really used */
if (dm_devs_cache_use()) {
log_debug_cache("Rescanning DM cache.");
if (!dm_devs_cache_update())
return_0;
if (!dm_devs_cache_update()) {
log_error("Can't allocate DM cache memory for VG %s.", vg_name);
failure |= FAILED_ALLOCATION;
goto bad;
}
}
/*