From: Vladimir Sementsov-Ogievskiy Date: Thu, 10 Jun 2021 10:07:54 +0000 (+0300) Subject: block/nbd: don't touch s->sioc in nbd_teardown_connection() X-Git-Tag: qemu-xen-4.16.0-rc4~119^2~8 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c2405af0e418a3f4cca0840f31161f7ac17b9697;p=qemu-xen.git block/nbd: don't touch s->sioc in nbd_teardown_connection() Negotiation during reconnect is now done in a thread, and s->sioc is not available during negotiation. Negotiation in thread will be cancelled by nbd_client_connection_release() called from nbd_clear_bdrvstate(). So, we don't need this code chunk anymore. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20210610100802.5888-25-vsementsov@virtuozzo.com> Signed-off-by: Eric Blake --- diff --git a/block/nbd.c b/block/nbd.c index 3114716444..2abcedd464 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -280,10 +280,6 @@ static void nbd_teardown_connection(BlockDriverState *bs) if (s->ioc) { /* finish any pending coroutines */ qio_channel_shutdown(s->ioc, QIO_CHANNEL_SHUTDOWN_BOTH, NULL); - } else if (s->sioc) { - /* abort negotiation */ - qio_channel_shutdown(QIO_CHANNEL(s->sioc), QIO_CHANNEL_SHUTDOWN_BOTH, - NULL); } s->state = NBD_CLIENT_QUIT;