[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v2 1/2] blockdev: release the AioContext at drive_ba
From: |
Sergio Lopez |
Subject: |
[Qemu-block] [PATCH v2 1/2] blockdev: release the AioContext at drive_backup_prepare |
Date: |
Fri, 13 Sep 2019 17:25:07 +0200 |
do_drive_backup() already acquires the AioContext, so release it
before the call.
Signed-off-by: Sergio Lopez <address@hidden>
---
blockdev.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index fbef6845c8..3927fdab80 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1783,20 +1783,16 @@ static void drive_backup_prepare(BlkActionState
*common, Error **errp)
aio_context = bdrv_get_aio_context(bs);
aio_context_acquire(aio_context);
-
/* Paired with .clean() */
bdrv_drained_begin(bs);
+ aio_context_release(aio_context);
state->bs = bs;
state->job = do_drive_backup(backup, common->block_job_txn, &local_err);
if (local_err) {
error_propagate(errp, local_err);
- goto out;
}
-
-out:
- aio_context_release(aio_context);
}
static void drive_backup_commit(BlkActionState *common)
--
2.21.0