From: Ján Tomko Date: Sat, 1 Nov 2014 11:11:38 +0000 (+0100) Subject: Relax duplicate SCSI host pool checking X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=593892314a194df22ea54e5b9606e2a188932439;p=libvirt.git Relax duplicate SCSI host pool checking Since commit 3f99d64 no new scsi_host pools can be defined if one of the already defined scsi_host pools does not refer to an accessible scsi_host adapter. Relax the check by skipping over these inaccessible pools when checking for duplicates. --- diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 0317b06edd..afd6cd4652 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -2175,7 +2175,7 @@ virStoragePoolSourceFindDuplicate(virStoragePoolObjListPtr pools, if (getSCSIHostNumber(pool->def->source.adapter, &pool_hostnum) < 0 || getSCSIHostNumber(def->source.adapter, &def_hostnum) < 0) - goto error; + break; if (pool_hostnum == def_hostnum) matchpool = pool; } @@ -2217,10 +2217,6 @@ virStoragePoolSourceFindDuplicate(virStoragePoolObjListPtr pools, ret = -1; } return ret; - - error: - virStoragePoolObjUnlock(pool); - return -1; } void