|
|
34b321 |
From c62e0877b191e5fba9b678bbd518a57c8fdf7099 Mon Sep 17 00:00:00 2001
|
|
|
34b321 |
From: Fam Zheng <famz@redhat.com>
|
|
|
34b321 |
Date: Thu, 10 Mar 2016 04:00:53 +0100
|
|
|
34b321 |
Subject: [PATCH 4/5] nbd: client_close on error in nbd_co_client_start
|
|
|
34b321 |
|
|
|
34b321 |
RH-Author: Fam Zheng <famz@redhat.com>
|
|
|
34b321 |
Message-id: <1457582453-13835-4-git-send-email-famz@redhat.com>
|
|
|
34b321 |
Patchwork-id: 69759
|
|
|
34b321 |
O-Subject: [RHEL-7.3 qemu-kvm PATCH v2 3/3] nbd: client_close on error in nbd_co_client_start
|
|
|
34b321 |
Bugzilla: 1285453
|
|
|
34b321 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
34b321 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
34b321 |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
34b321 |
|
|
|
34b321 |
From: Max Reitz <mreitz@redhat.com>
|
|
|
34b321 |
|
|
|
34b321 |
Use client_close() if an error in nbd_co_client_start() occurs instead
|
|
|
34b321 |
of manually inlining parts of it. This fixes an assertion error on the
|
|
|
34b321 |
server side if nbd_negotiate() fails.
|
|
|
34b321 |
|
|
|
34b321 |
Signed-off-by: Max Reitz <mreitz@redhat.com>
|
|
|
34b321 |
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
34b321 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
34b321 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
34b321 |
(cherry picked from commit d3780c2dce2c452759ee9d94f9d824cf14cc3ab8)
|
|
|
34b321 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
34b321 |
|
|
|
34b321 |
Downstream: client_close -> nbd_client_close.
|
|
|
34b321 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
34b321 |
---
|
|
|
34b321 |
nbd.c | 3 +--
|
|
|
34b321 |
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
34b321 |
|
|
|
34b321 |
diff --git a/nbd.c b/nbd.c
|
|
|
34b321 |
index 97aeecb..c20e57e 100644
|
|
|
34b321 |
--- a/nbd.c
|
|
|
34b321 |
+++ b/nbd.c
|
|
|
34b321 |
@@ -1282,8 +1282,7 @@ static coroutine_fn void nbd_co_client_start(void *opaque)
|
|
|
34b321 |
nbd_export_get(exp);
|
|
|
34b321 |
}
|
|
|
34b321 |
if (nbd_negotiate(data)) {
|
|
|
34b321 |
- shutdown(client->sock, 2);
|
|
|
34b321 |
- client->close(client);
|
|
|
34b321 |
+ nbd_client_close(client);
|
|
|
34b321 |
goto out;
|
|
|
34b321 |
}
|
|
|
34b321 |
qemu_co_mutex_init(&client->send_lock);
|
|
|
34b321 |
--
|
|
|
34b321 |
1.8.3.1
|
|
|
34b321 |
|