ae23c9
From 1db9da574c842c61e80523d9bdb8bf258a8bc883 Mon Sep 17 00:00:00 2001
ae23c9
From: Kevin Wolf <kwolf@redhat.com>
ae23c9
Date: Tue, 26 Jun 2018 09:48:38 +0200
ae23c9
Subject: [PATCH 130/268] vhdx: Fix vhdx_co_create() return value
ae23c9
ae23c9
RH-Author: Kevin Wolf <kwolf@redhat.com>
ae23c9
Message-id: <20180626094856.6924-56-kwolf@redhat.com>
ae23c9
Patchwork-id: 81127
ae23c9
O-Subject: [RHV-7.6 qemu-kvm-rhev PATCH v2 55/73] vhdx: Fix vhdx_co_create() return value
ae23c9
Bugzilla: 1513543
ae23c9
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
ae23c9
RH-Acked-by: Max Reitz <mreitz@redhat.com>
ae23c9
RH-Acked-by: Fam Zheng <famz@redhat.com>
ae23c9
ae23c9
.bdrv_co_create() is supposed to return 0 on success, but vhdx could
ae23c9
return a positive value instead. Fix this.
ae23c9
ae23c9
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ae23c9
Reviewed-by: Max Reitz <mreitz@redhat.com>
ae23c9
Reviewed-by: Jeff Cody <jcody@redhat.com>
ae23c9
(cherry picked from commit 4a5f2779bad769184550869931937acd0707ec3b)
ae23c9
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ae23c9
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
ae23c9
---
ae23c9
 block/vhdx.c | 2 +-
ae23c9
 1 file changed, 1 insertion(+), 1 deletion(-)
ae23c9
ae23c9
diff --git a/block/vhdx.c b/block/vhdx.c
ae23c9
index 6731298..31ac53b 100644
ae23c9
--- a/block/vhdx.c
ae23c9
+++ b/block/vhdx.c
ae23c9
@@ -1950,7 +1950,7 @@ static int coroutine_fn vhdx_co_create(BlockdevCreateOptions *opts,
ae23c9
         goto delete_and_exit;
ae23c9
     }
ae23c9
 
ae23c9
-
ae23c9
+    ret = 0;
ae23c9
 delete_and_exit:
ae23c9
     blk_unref(blk);
ae23c9
     bdrv_unref(bs);
ae23c9
-- 
ae23c9
1.8.3.1
ae23c9