lkml.org 
[lkml]   [2012]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch]block: fix ioc locking warning
Hello,

On Mon, Feb 06, 2012 at 03:50:11PM +0800, Shaohua Li wrote:
> diff --git a/block/blk-ioc.c b/block/blk-ioc.c
> index 27a06e0..7490b6d 100644
> --- a/block/blk-ioc.c
> +++ b/block/blk-ioc.c
> @@ -204,7 +204,9 @@ void put_io_context(struct io_context *ioc, struct request_queue *locked_q)
> spin_unlock(last_q->queue_lock);
> last_q = NULL;
>
> - if (!spin_trylock(this_q->queue_lock))
> + /* spin_trylock() always successes in UP case */
> + if (this_q != locked_q &&
> + !spin_trylock(this_q->queue_lock))

Yeah, this is the right thing to do. I think the comment is slightly
misleading. I'll prep a patch.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2012-02-06 17:25    [W:0.182 / U:0.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site