projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2bc625
)
nbd: make nbd_client_session_close() idempotent
author
Marc-André Lureau
<marcandre.lureau@redhat.com>
Sun, 1 Dec 2013 21:23:44 +0000
(22:23 +0100)
committer
Gerd Hoffmann
<kraxel@redhat.com>
Mon, 16 Dec 2013 09:12:20 +0000
(10:12 +0100)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
block/nbd-client.c
patch
|
blob
|
history
diff --git
a/block/nbd-client.c
b/block/nbd-client.c
index 3dfae1da09db2bcc9663a985d3da836fb797290d..9156093dc0975617b2580cbf53b8121c500e07a4 100644
(file)
--- a/
block/nbd-client.c
+++ b/
block/nbd-client.c
@@
-337,7
+337,12
@@
static void nbd_teardown_connection(NbdClientSession *client)
void nbd_client_session_close(NbdClientSession *client)
{
+ if (!client->bs) {
+ return;
+ }
+
nbd_teardown_connection(client);
+ client->bs = NULL;
}
int nbd_client_session_init(NbdClientSession *client, BlockDriverState *bs,