From d993b85804b7ec099d4e1d377161ac8af398d855 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 5 Jun 2017 14:38:52 +0200 Subject: block: access io_limits_disabled with atomic ops Reviewed-by: Stefan Hajnoczi Reviewed-by: Alberto Garcia Signed-off-by: Paolo Bonzini Message-Id: <20170605123908.18777-4-pbonzini@redhat.com> Signed-off-by: Fam Zheng --- block/throttle-groups.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/throttle-groups.c') diff --git a/block/throttle-groups.c b/block/throttle-groups.c index b73e7a800b..69bfbd44d9 100644 --- a/block/throttle-groups.c +++ b/block/throttle-groups.c @@ -240,7 +240,7 @@ static bool throttle_group_schedule_timer(BlockBackend *blk, bool is_write) ThrottleGroup *tg = container_of(ts, ThrottleGroup, ts); bool must_wait; - if (blkp->io_limits_disabled) { + if (atomic_read(&blkp->io_limits_disabled)) { return false; } -- cgit v1.2.1