thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

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

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