| Date | Wed, 9 Mar 2022 14:05:50 -0700 | Subject | Re: [PATCH 07/13] task_work: Introduce task_work_pending | From | Jens Axboe <> |
| |
On 3/9/22 9:24 AM, Eric W. Biederman wrote: > diff --git a/include/linux/task_work.h b/include/linux/task_work.h > index 5b8a93f288bb..897494b597ba 100644 > --- a/include/linux/task_work.h > +++ b/include/linux/task_work.h > @@ -19,6 +19,11 @@ enum task_work_notify_mode { > TWA_SIGNAL, > }; > > +static inline bool task_work_pending(struct task_struct *task) > +{ > + return READ_ONCE(task->task_works); > +} > +
Most of the checks for this is current, do we need READ_ONCE here?
-- Jens Axboe
|