mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
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>
This commit is contained in:
parent
7a6f391376
commit
b666d23950
5 changed files with 7 additions and 6 deletions
|
@ -338,7 +338,7 @@ typedef struct QCowAIOCB {
|
|||
|
||||
static void qcow_aio_cancel(BlockDriverAIOCB *blockacb)
|
||||
{
|
||||
QCowAIOCB *acb = (QCowAIOCB *)blockacb;
|
||||
QCowAIOCB *acb = container_of(blockacb, QCowAIOCB, common);
|
||||
if (acb->hd_aiocb)
|
||||
bdrv_aio_cancel(acb->hd_aiocb);
|
||||
qemu_aio_release(acb);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue