diff options
author | Tejun Heo <tj@kernel.org> | 2011-12-13 18:33:37 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2011-12-13 18:33:37 -0500 |
commit | 34f6055c80285e4efb3f602a9119db75239744dc (patch) | |
tree | eb05185976c1941d196d259c3dfc2a4cfa7469d1 /block/blk-core.c | |
parent | 1ba64edef6051d2ec79bb2fbd3a0c8f0df00ab55 (diff) |
block: add blk_queue_dead()
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>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 435af2378614..b5ed4f4a8d96 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -608,7 +608,7 @@ EXPORT_SYMBOL(blk_init_allocated_queue_node); | |||
608 | 608 | ||
609 | int blk_get_queue(struct request_queue *q) | 609 | int blk_get_queue(struct request_queue *q) |
610 | { | 610 | { |
611 | if (likely(!test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))) { | 611 | if (likely(!blk_queue_dead(q))) { |
612 | kobject_get(&q->kobj); | 612 | kobject_get(&q->kobj); |
613 | return 0; | 613 | return 0; |
614 | } | 614 | } |
@@ -755,7 +755,7 @@ static struct request *get_request(struct request_queue *q, int rw_flags, | |||
755 | const bool is_sync = rw_is_sync(rw_flags) != 0; | 755 | const bool is_sync = rw_is_sync(rw_flags) != 0; |
756 | int may_queue; | 756 | int may_queue; |
757 | 757 | ||
758 | if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))) | 758 | if (unlikely(blk_queue_dead(q))) |
759 | return NULL; | 759 | return NULL; |
760 | 760 | ||
761 | may_queue = elv_may_queue(q, rw_flags); | 761 | may_queue = elv_may_queue(q, rw_flags); |
@@ -875,7 +875,7 @@ static struct request *get_request_wait(struct request_queue *q, int rw_flags, | |||
875 | struct io_context *ioc; | 875 | struct io_context *ioc; |
876 | struct request_list *rl = &q->rq; | 876 | struct request_list *rl = &q->rq; |
877 | 877 | ||
878 | if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))) | 878 | if (unlikely(blk_queue_dead(q))) |
879 | return NULL; | 879 | return NULL; |
880 | 880 | ||
881 | prepare_to_wait_exclusive(&rl->wait[is_sync], &wait, | 881 | prepare_to_wait_exclusive(&rl->wait[is_sync], &wait, |