lkml.org 
[lkml]   [2011]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/6] block: add blk_queue_dead()
On Tue, Oct 25, 2011 at 06:02:05PM -0700, Tejun Heo wrote:
> There are a number of QUEUE_FLAG_DEAD tests. Add blk_queue_dead()
> macro and use it.
>
> This patch doesn't introduce any functional difference.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Jens Axboe <axboe@kernel.dk>
> ---
> block/blk-core.c | 6 +++---
> block/blk-exec.c | 2 +-
> block/blk-sysfs.c | 4 ++--
> block/blk-throttle.c | 4 ++--
> block/blk.h | 2 +-
> include/linux/blkdev.h | 1 +
> 6 files changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/block/blk-core.c b/block/blk-core.c
> index 1efb943..7d39897 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -603,7 +603,7 @@ EXPORT_SYMBOL(blk_init_allocated_queue_node);
>
> int blk_get_queue(struct request_queue *q)
> {
> - if (likely(!test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))) {
> + if (likely(!blk_queue_dead(q))) {
> kobject_get(&q->kobj);
> return 0;

I thought DEAD flag is now synchronized with queue lock. So the protocol
is that caller should be holding queue lock here first?

Thanks
Vivek


\
 
 \ /
  Last update: 2011-10-26 19:41    [from the cache]
©2003-2011 Jasper Spaans