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

cleanup: dont hide pv_dev declaration from pv

Just skip using local vars here...
This commit is contained in:
Zdenek Kabelac 2014-10-07 10:17:34 +02:00
parent b836525d9c
commit 9810f8aac7

View File

@ -1778,12 +1778,9 @@ struct pv_list *find_pv_in_vg(const struct volume_group *vg,
const char *pv_name)
{
struct pv_list *pvl;
struct device *pv_dev, *cached_dev;
dm_list_iterate_items(pvl, &vg->pvs) {
pv_dev = pvl->pv->dev;
cached_dev = dev_cache_get(pv_name, vg->cmd->filter);
if (!pv_dev) {
if (!pvl->pv->dev) {
/*
* pv_dev can't be NULL here!
* We have to catch this situation earlier in the
@ -1800,10 +1797,10 @@ struct pv_list *find_pv_in_vg(const struct volume_group *vg,
* handled earlier in the code in that case.
*/
log_error(INTERNAL_ERROR "find_pv_in_vg: PV that is not "
"bound to any existing device found");
"bound to any existing device found.");
return NULL;
}
if (pv_dev == cached_dev)
if (pvl->pv->dev == dev_cache_get(pv_name, vg->cmd->filter))
return pvl;
}