On 13.09.18 14:52, Kevin Wolf wrote: > job_finish_sync() needs to release the AioContext lock of the job before > calling aio_poll(). Otherwise, callbacks called by aio_poll() would > possibly take the lock a second time and run into a deadlock with a > nested AIO_WAIT_WHILE() call. > > Also, job_drain() without aio_poll() isn't necessarily enough to make > progress on a job, it could depend on bottom halves to be executed. > > Combine both open-coded while loops into a single AIO_WAIT_WHILE() call > that solves both of these problems. > > Signed-off-by: Kevin Wolf <kw...@redhat.com> > Reviewed-by: Fam Zheng <f...@redhat.com> > --- > job.c | 14 ++++++-------- > 1 file changed, 6 insertions(+), 8 deletions(-)
Reviewed-by: Max Reitz <mre...@redhat.com>
signature.asc
Description: OpenPGP digital signature