diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2023-03-03 11:02:34 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-04-20 11:17:35 +0200 |
commit | 6a8a98a049f84d6633d024e97a1ecab2f220fa85 (patch) | |
tree | 8e124f2e7d4715e616e6869779e55a2d171b8432 /block | |
parent | 72497cff896fecf74306ed33626c30e43633cdd6 (diff) |
block-backend: remove qatomic_mb_read()
There is already a barrier in AIO_WAIT_WHILE_INTERNAL(), thus the
qatomic_mb_read() is not adding anything.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/block-backend.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/block-backend.c b/block/block-backend.c index 55efc735b4..5566ea059d 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -1845,7 +1845,7 @@ void blk_drain(BlockBackend *blk) /* We may have -ENOMEDIUM completions in flight */ AIO_WAIT_WHILE(blk_get_aio_context(blk), - qatomic_mb_read(&blk->in_flight) > 0); + qatomic_read(&blk->in_flight) > 0); if (bs) { bdrv_drained_end(bs); @@ -1867,7 +1867,7 @@ void blk_drain_all(void) aio_context_acquire(ctx); /* We may have -ENOMEDIUM completions in flight */ - AIO_WAIT_WHILE(ctx, qatomic_mb_read(&blk->in_flight) > 0); + AIO_WAIT_WHILE(ctx, qatomic_read(&blk->in_flight) > 0); aio_context_release(ctx); } |