1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: trace error from lvmcache_update_vgname_and_id

Check result value from lvmcache_update_vgname_and_id().
This commit is contained in:
Zdenek Kabelac 2015-08-18 13:48:53 +02:00
parent 3a3e17d603
commit a8fd88463e
2 changed files with 5 additions and 3 deletions

View File

@ -453,8 +453,9 @@ static struct raw_locn *_find_vg_rlocn(struct device_area *dev_area,
"not match expected name %s.", vgname);
bad:
if ((info = lvmcache_info_from_pvid(dev_area->dev->pvid, 0)))
lvmcache_update_vgname_and_id(info, &vgsummary_orphan);
if ((info = lvmcache_info_from_pvid(dev_area->dev->pvid, 0)) &&
!lvmcache_update_vgname_and_id(info, &vgsummary_orphan))
stack;
return NULL;
}

View File

@ -105,7 +105,8 @@ static void _update_lvmcache_orphan(struct lvmcache_info *info)
memcpy(&vgsummary_orphan.vgid, lvmcache_fmt(info)->orphan_vg_name, strlen(lvmcache_fmt(info)->orphan_vg_name));
lvmcache_update_vgname_and_id(info, &vgsummary_orphan);
if (!lvmcache_update_vgname_and_id(info, &vgsummary_orphan))
stack;
}
static struct labeller *_find_labeller(struct device *dev, char *buf,