Am 27/07/2022 um 17:53 schrieb Vladimir Sementsov-Ogievskiy:
>> * job_lock:
>> @@ -672,7 +673,7 @@ void job_user_cancel_locked(Job *job, bool force,
>> Error **errp);
>> * Returns the return value from the job if the job actually completed
>> * during the call, or -ECANCELED if it was canceled.
>> *
>> - * Callers must hold the AioContext lock of job->aio_context.
>> + * Called with job_lock held.
>
> That's wrong, it should be called with job_lock not held :)
>
>> */
>> int job_cancel_sync(Job *job, bool force);
>> @@ -697,8 +698,7 @@ void job_cancel_sync_all(void);
>> * function).
>> *
>> * Returns the return value from the job.
>> - *
>> - * Callers must hold the AioContext lock of job->aio_context.
>> + * Called with job_lock held.
>
> and this,
>
>> */
>> int job_complete_sync(Job *job, Error **errp);
>> @@ -734,7 +734,7 @@ void job_dismiss_locked(Job **job, Error **errp);
>> * Returns 0 if the job is successfully completed, -ECANCELED if the
>> job was
>> * cancelled before completing, and -errno in other error cases.
>> *
>> - * Callers must hold the AioContext lock of job->aio_context.
>> + * Called with job_lock held.
>
> and this.
Well, except for this part here :) You're right here.