aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'block.c')
-rw-r--r--block.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block.c b/block.c
index 48305b7d7c..6345599de2 100644
--- a/block.c
+++ b/block.c
@@ -2108,7 +2108,8 @@ typedef struct BlockDriverAIOCBSync {
static void bdrv_aio_cancel_em(BlockDriverAIOCB *blockacb)
{
- BlockDriverAIOCBSync *acb = (BlockDriverAIOCBSync *)blockacb;
+ BlockDriverAIOCBSync *acb =
+ container_of(blockacb, BlockDriverAIOCBSync, common);
qemu_bh_delete(acb->bh);
acb->bh = NULL;
qemu_aio_release(acb);