aboutsummaryrefslogtreecommitdiff
path: root/block/nbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/nbd.c')
-rw-r--r--block/nbd.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/block/nbd.c b/block/nbd.c
index 1d4668d42d..1c6315b168 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -289,9 +289,7 @@ static void coroutine_fn nbd_client_co_drain_begin(BlockDriverState *bs)
BDRVNBDState *s = (BDRVNBDState *)bs->opaque;
s->drained = true;
- if (s->connection_co_sleep_ns_state) {
- qemu_co_sleep_wake(s->connection_co_sleep_ns_state);
- }
+ qemu_co_sleep_wake(s->connection_co_sleep_ns_state);
nbd_co_establish_connection_cancel(bs, false);
@@ -330,9 +328,7 @@ static void nbd_teardown_connection(BlockDriverState *bs)
s->state = NBD_CLIENT_QUIT;
if (s->connection_co) {
- if (s->connection_co_sleep_ns_state) {
- qemu_co_sleep_wake(s->connection_co_sleep_ns_state);
- }
+ qemu_co_sleep_wake(s->connection_co_sleep_ns_state);
nbd_co_establish_connection_cancel(bs, true);
}
if (qemu_in_coroutine()) {