提交 b330600a 编写于 作者: J John Ferlan

util: Fix virStorageBackendSCSINewLun error handling

Commit a523770c added @retval return processing for
virStorageBackendUpdateVolInfo in order to allow a -2
to be return; however, upon successful completion
@retval = 0 and if either the virStorageBackendSCSISerial
or the virStoragePoolObjAddVol failed, the method would
return 0, but not add the @vol to the pool. So let's
just reset retval = -1 and continue processing.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 38362460
......@@ -3869,6 +3869,9 @@ virStorageBackendSCSINewLun(virStoragePoolObjPtr pool,
VIR_STORAGE_VOL_READ_NOERROR)) < 0)
goto cleanup;
/* Reset retval for proper error handling */
retval = -1;
vol->key = virStorageBackendSCSISerial(vol->target.path,
(def->source.adapter.type ==
VIR_STORAGE_ADAPTER_TYPE_FC_HOST));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册