mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
72497cff89
commit
6a8a98a049
1 changed files with 2 additions and 2 deletions
|
@ -1845,7 +1845,7 @@ void blk_drain(BlockBackend *blk)
|
||||||
|
|
||||||
/* We may have -ENOMEDIUM completions in flight */
|
/* We may have -ENOMEDIUM completions in flight */
|
||||||
AIO_WAIT_WHILE(blk_get_aio_context(blk),
|
AIO_WAIT_WHILE(blk_get_aio_context(blk),
|
||||||
qatomic_mb_read(&blk->in_flight) > 0);
|
qatomic_read(&blk->in_flight) > 0);
|
||||||
|
|
||||||
if (bs) {
|
if (bs) {
|
||||||
bdrv_drained_end(bs);
|
bdrv_drained_end(bs);
|
||||||
|
@ -1867,7 +1867,7 @@ void blk_drain_all(void)
|
||||||
aio_context_acquire(ctx);
|
aio_context_acquire(ctx);
|
||||||
|
|
||||||
/* We may have -ENOMEDIUM completions in flight */
|
/* 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);
|
aio_context_release(ctx);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue