From 593892314a194df22ea54e5b9606e2a188932439 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A1n=20Tomko?= Date: Sat, 1 Nov 2014 12:11:38 +0100 Subject: [PATCH] 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. --- src/conf/storage_conf.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 -- 2.39.5