block/nbd: correctly use qio_channel_detach_aio_context when needed
commit8a509afd724671ffc066235e368ba7d81c9a6dd7
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Thu, 3 Sep 2020 19:02:59 +0000 (3 22:02 +0300)
committerEric Blake <eblake@redhat.com>
Fri, 9 Oct 2020 20:04:32 +0000 (9 15:04 -0500)
treec1da4d5de41e96267b218d8880bd02cc80e75c1e
parent8c517de24a8a1dcbeb54e7e12b5b0fda42a90ace
block/nbd: correctly use qio_channel_detach_aio_context when needed

Don't use nbd_client_detach_aio_context() driver handler where we want
to finalize the connection. We should directly use
qio_channel_detach_aio_context() in such cases. Driver handler may (and
will) contain another things, unrelated to the qio channel.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20200903190301.367620-3-vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
block/nbd.c