[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 07/48] nbd: client_close on error in nbd_co_client_st
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 07/48] nbd: client_close on error in nbd_co_client_start |
Date: |
Fri, 29 Jan 2016 18:37:13 +0100 |
From: Max Reitz <address@hidden>
Use client_close() if an error in nbd_co_client_start() occurs instead
of manually inlining parts of it. This fixes an assertion error on the
server side if nbd_negotiate() fails.
Signed-off-by: Max Reitz <address@hidden>
Acked-by: Paolo Bonzini <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
nbd/server.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/nbd/server.c b/nbd/server.c
index 2265cb0..5169b59 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -1080,8 +1080,7 @@ static coroutine_fn void nbd_co_client_start(void *opaque)
nbd_export_get(exp);
}
if (nbd_negotiate(data)) {
- shutdown(client->sock, 2);
- client->close(client);
+ client_close(client);
goto out;
}
qemu_co_mutex_init(&client->send_lock);
--
1.8.3.1
- [Qemu-devel] [PULL 00/48] Block patches, Kevin Wolf, 2016/01/29
- [Qemu-devel] [PULL 01/48] block: Add blk_dev_has_tray(), Kevin Wolf, 2016/01/29
- [Qemu-devel] [PULL 04/48] block/qapi: Emit tray_open only if there is a tray, Kevin Wolf, 2016/01/29
- [Qemu-devel] [PULL 03/48] Revert "hw/block/fdc: Implement tray status", Kevin Wolf, 2016/01/29
- [Qemu-devel] [PULL 07/48] nbd: client_close on error in nbd_co_client_start,
Kevin Wolf <=
- [Qemu-devel] [PULL 05/48] vmdk: Fix converting to streamOptimized, Kevin Wolf, 2016/01/29
- [Qemu-devel] [PULL 06/48] iotests: Limit supported formats for 118, Kevin Wolf, 2016/01/29
- [Qemu-devel] [PULL 09/48] iotests: Change coding style of _filter_nbd in 083, Kevin Wolf, 2016/01/29
- [Qemu-devel] [PULL 02/48] blockdev: Fix 'change' for slot devices, Kevin Wolf, 2016/01/29
- [Qemu-devel] [PULL 12/48] iotests: Make _filter_nbd support more URL types, Kevin Wolf, 2016/01/29
- [Qemu-devel] [PULL 13/48] iotests: Make redirecting qemu's stderr optional, Kevin Wolf, 2016/01/29
- [Qemu-devel] [PULL 14/48] iotests: Add test for a nonexistent NBD export, Kevin Wolf, 2016/01/29
- [Qemu-devel] [PULL 16/48] block: Release named dirty bitmaps in bdrv_close(), Kevin Wolf, 2016/01/29
- [Qemu-devel] [PULL 10/48] iotests: Move _filter_nbd into common.filter, Kevin Wolf, 2016/01/29
- [Qemu-devel] [PULL 15/48] block: Remove unused struct definition BlockFinishData, Kevin Wolf, 2016/01/29