Re: [PATCH v9 10/12] kthread: Allow to cancel kthread work

2016-06-20 Thread Tejun Heo
On Thu, Jun 16, 2016 at 01:17:29PM +0200, Petr Mladek wrote: > +/* > + * Returns true when the work could not be queued at the moment. > + * It happens when it is already pending in a worker list > + * or when it is being cancelled. > + * > + * This function must be called under

Re: [PATCH v9 10/12] kthread: Allow to cancel kthread work

2016-06-20 Thread Tejun Heo
On Thu, Jun 16, 2016 at 01:17:29PM +0200, Petr Mladek wrote: > +/* > + * Returns true when the work could not be queued at the moment. > + * It happens when it is already pending in a worker list > + * or when it is being cancelled. > + * > + * This function must be called under

[PATCH v9 10/12] kthread: Allow to cancel kthread work

2016-06-16 Thread Petr Mladek
We are going to use kthread workers more widely and sometimes we will need to make sure that the work is neither pending nor running. This patch implements cancel_*_sync() operations as inspired by workqueues. Well, we are synchronized against the other operations via the worker lock, we use

[PATCH v9 10/12] kthread: Allow to cancel kthread work

2016-06-16 Thread Petr Mladek
We are going to use kthread workers more widely and sometimes we will need to make sure that the work is neither pending nor running. This patch implements cancel_*_sync() operations as inspired by workqueues. Well, we are synchronized against the other operations via the worker lock, we use