mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-25 11:01:52 -06:00
job: Fix missing locking due to mismerge
job_completed() had a problem with double locking that was recently fixed independently by two different commits: "job: Fix nested aio_poll() hanging in job_txn_apply" "jobs: add exit shim" One fix removed the first aio_context_acquire(), the other fix removed the other one. Now we have a bug again and the code is run without any locking. Add it back in one of the places. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
This commit is contained in:
parent
49880165a4
commit
d1756c780b
1 changed files with 4 additions and 0 deletions
4
job.c
4
job.c
|
@ -847,7 +847,11 @@ static void job_completed(Job *job)
|
||||||
static void job_exit(void *opaque)
|
static void job_exit(void *opaque)
|
||||||
{
|
{
|
||||||
Job *job = (Job *)opaque;
|
Job *job = (Job *)opaque;
|
||||||
|
AioContext *ctx = job->aio_context;
|
||||||
|
|
||||||
|
aio_context_acquire(ctx);
|
||||||
job_completed(job);
|
job_completed(job);
|
||||||
|
aio_context_release(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue