lkml.org 
[lkml]   [2013]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 02/13] workqueue: fix work_busy()
From
On Wed, Feb 6, 2013 at 2:53 AM, Tejun Heo <tj@kernel.org> wrote:
> Hello,
>
> On Tue, Feb 05, 2013 at 08:06:54PM +0800, Lai Jiangshan wrote:
>> >>@@ -3453,15 +3451,13 @@ unsigned int work_busy(struct work_struct *work)
>> >> {
>> >> struct worker_pool *pool = get_work_pool(work);
>> >> unsigned long flags;
>> >>- unsigned int ret = 0;
>> >>+ unsigned int ret = work_pending(work) ? WORK_BUSY_PENDING : 0;
>> >
>> >I'd prefer this as a if() statement.
>> >
>> >> if (!pool)
>> >>- return 0;
>> >>+ return ret;
>> >
>> >I'm a bit confused. When can we be pending w/o pool?
>> >
>>
>> grab the pending bits <==time==> really queued
>> ^
>> this patch considers the work is busy in this time
>
> Given the advisory nature of the function, why do we care? Is it
> needed for later patches?
>

Ah, yes.

Thanks,
Lai


\
 
 \ /
  Last update: 2013-02-06 13:21    [W:0.065 / U:3.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site