Blame SOURCES/kvm-iscsi-Don-t-set-error-if-already-set-in-iscsi_do_inq.patch

240766
From 157bc246bfb0a67c65e1cca823f8ec60d071ff97 Mon Sep 17 00:00:00 2001
240766
From: Fam Zheng <famz@redhat.com>
240766
Date: Sun, 6 Apr 2014 01:10:17 +0200
240766
Subject: [PATCH 08/12] iscsi: Don't set error if already set in iscsi_do_inquiry
240766
240766
RH-Author: Fam Zheng <famz@redhat.com>
240766
Message-id: <1396746617-11978-1-git-send-email-famz@redhat.com>
240766
Patchwork-id: 58350
240766
O-Subject: [RHEL-7 0day qemu-kvm PATCH 8/7] iscsi: Don't set error if already set in iscsi_do_inquiry
240766
Bugzilla: 1090978
240766
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
240766
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
240766
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
240766
240766
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1083413
240766
Brew: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=7308220
240766
240766
This eliminates the possible assertion failure in error_setg().
240766
240766
Signed-off-by: Fam Zheng <famz@redhat.com>
240766
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
240766
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
240766
(cherry picked from commit cbee81f6de57ddc1b21ba28f01f6a3b5d87428a5)
240766
Signed-off-by: Fam Zheng <famz@redhat.com>
240766
---
240766
 block/iscsi.c | 6 ++++--
240766
 1 file changed, 4 insertions(+), 2 deletions(-)
240766
240766
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
240766
---
240766
 block/iscsi.c |    6 ++++--
240766
 1 files changed, 4 insertions(+), 2 deletions(-)
240766
240766
diff --git a/block/iscsi.c b/block/iscsi.c
240766
index 78ab91e..ff5ca20 100644
240766
--- a/block/iscsi.c
240766
+++ b/block/iscsi.c
240766
@@ -1280,8 +1280,10 @@ static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi, int lun,
240766
     return task;
240766
 
240766
 fail:
240766
-    error_setg(errp, "iSCSI: Inquiry command failed : %s",
240766
-               iscsi_get_error(iscsi));
240766
+    if (!error_is_set(errp)) {
240766
+        error_setg(errp, "iSCSI: Inquiry command failed : %s",
240766
+                   iscsi_get_error(iscsi));
240766
+    }
240766
     if (task != NULL) {
240766
         scsi_free_scsi_task(task);
240766
     }
240766
-- 
240766
1.7.1
240766