diff options
author | Kevin Wolf <kwolf@redhat.com> | 2010-05-05 11:44:39 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2010-05-17 10:20:05 +0200 |
commit | b666d239509a0855740444c254a65cbf567bfb90 (patch) | |
tree | e8d2539f1ad8d0c9578974bfe74fb5ad3b5008e4 /block.c | |
parent | 7a6f391376c61af1dce2d624a4fcff8eec4fa097 (diff) |
block: Avoid unchecked casts for AIOCBs
Use container_of for one direction and &acb->common for the other one.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r-- | block.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |