lkml.org 
[lkml]   [2013]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: linux-next: manual merge of the akpm tree with the workqueues tree
Hello, Andrew.

On Wed, Mar 13, 2013 at 12:46:24PM -0700, Andrew Morton wrote:
> Tejun, can you please confirm that this is how worker_pool_assign_id()
> should look in linux-next?
>
> static int worker_pool_assign_id(struct worker_pool *pool)
> {
> int ret;
>
> do {
> idr_preload(GFP_KERNEL);
> spin_lock_irq(&workqueue_lock);
> ret = idr_alloc(&worker_pool_idr, pool, 0, 0, GFP_NOWAIT);
> if (ret >= 0)
> pool->id = ret;
> spin_unlock_irq(&workqueue_lock);

idr_preload_end();

> } while (ret == -EAGAIN);
>
> return ret < 0 ? ret : 0;
> }

Other than that, it looks good to me.

Thanks!

--
tejun


\
 
 \ /
  Last update: 2013-03-13 22:42    [W:0.076 / U:2.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site