aboutsummaryrefslogtreecommitdiff
path: root/block/commit.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/commit.c')
-rw-r--r--block/commit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/commit.c b/block/commit.c
index 46cbeaec3e..ba5df6aa0a 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -197,8 +197,8 @@ static void coroutine_fn commit_run(void *opaque)
/* Publish progress */
block_job_progress_update(&s->common, n);
- if (copy && s->common.speed) {
- delay_ns = ratelimit_calculate_delay(&s->common.limit, n);
+ if (copy) {
+ delay_ns = block_job_ratelimit_get_delay(&s->common, n);
} else {
delay_ns = 0;
}