summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block/mirror.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/mirror.c b/block/mirror.c
index 0ef41f999e..9a0a55940c 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -325,8 +325,8 @@ static void coroutine_fn mirror_run(void *opaque)
s->common.len = bdrv_getlength(bs);
if (s->common.len <= 0) {
- block_job_completed(&s->common, s->common.len);
- return;
+ ret = s->common.len;
+ goto immediate_exit;
}
length = (bdrv_getlength(bs) + s->granularity - 1) / s->granularity;