[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v10 18/21] job.c: enable job lock/unlock and remove Aiocontex
From: |
Emanuele Giuseppe Esposito |
Subject: |
Re: [PATCH v10 18/21] job.c: enable job lock/unlock and remove Aiocontext locks |
Date: |
Tue, 16 Aug 2022 14:53:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 |
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.