thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-iscsi-Remember-to-set-ret-for-iscsi_open-in-error-ca.patch

9ae3a8
From 20bb4af6d97719f250a0424e55b7342601a2b7ef Mon Sep 17 00:00:00 2001
9ae3a8
From: Fam Zheng <famz@redhat.com>
9ae3a8
Date: Mon, 14 Apr 2014 02:05:19 +0200
9ae3a8
Subject: [PATCH 09/12] iscsi: Remember to set ret for iscsi_open in error case
9ae3a8
9ae3a8
RH-Author: Fam Zheng <famz@redhat.com>
9ae3a8
Message-id: <1397441119-8563-1-git-send-email-famz@redhat.com>
9ae3a8
Patchwork-id: 58457
9ae3a8
O-Subject: [RHEL-7 0day qemu-kvm PATCH 9/7] iscsi: Remember to set ret for iscsi_open in error case
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
Signed-off-by: Fam Zheng <famz@redhat.com>
9ae3a8
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9ae3a8
(cherry picked from commit cd82b6fb4daf87f17742f7971ba6cb90d23e6703)
9ae3a8
Signed-off-by: Fam Zheng <famz@redhat.com>
9ae3a8
---
9ae3a8
 block/iscsi.c | 1 +
9ae3a8
 1 file changed, 1 insertion(+)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 block/iscsi.c |    1 +
9ae3a8
 1 files changed, 1 insertions(+), 0 deletions(-)
9ae3a8
9ae3a8
diff --git a/block/iscsi.c b/block/iscsi.c
9ae3a8
index ff5ca20..9fe3be8 100644
9ae3a8
--- a/block/iscsi.c
9ae3a8
+++ b/block/iscsi.c
9ae3a8
@@ -1408,6 +1408,7 @@ static int iscsi_open(BlockDriverState *bs, QDict *options, int flags,
9ae3a8
     iscsi_readcapacity_sync(iscsilun, &local_err);
9ae3a8
     if (local_err != NULL) {
9ae3a8
         error_propagate(errp, local_err);
9ae3a8
+        ret = -EINVAL;
9ae3a8
         goto out;
9ae3a8
     }
9ae3a8
     bs->total_sectors = sector_lun2qemu(iscsilun->num_blocks, iscsilun);
9ae3a8
-- 
9ae3a8
1.7.1
9ae3a8