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-throttle.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-throttle.c')
-rw-r--r-- | block/blk-throttle.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 4553245d9317..5eed6a76721d 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c | |||
@@ -310,7 +310,7 @@ static struct throtl_grp * throtl_get_tg(struct throtl_data *td) | |||
310 | struct request_queue *q = td->queue; | 310 | struct request_queue *q = td->queue; |
311 | 311 | ||
312 | /* no throttling for dead queue */ | 312 | /* no throttling for dead queue */ |
313 | if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))) | 313 | if (unlikely(blk_queue_dead(q))) |
314 | return NULL; | 314 | return NULL; |
315 | 315 | ||
316 | rcu_read_lock(); | 316 | rcu_read_lock(); |
@@ -335,7 +335,7 @@ static struct throtl_grp * throtl_get_tg(struct throtl_data *td) | |||
335 | spin_lock_irq(q->queue_lock); | 335 | spin_lock_irq(q->queue_lock); |
336 | 336 | ||
337 | /* Make sure @q is still alive */ | 337 | /* Make sure @q is still alive */ |
338 | if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))) { | 338 | if (unlikely(blk_queue_dead(q))) { |
339 | kfree(tg); | 339 | kfree(tg); |
340 | return NULL; | 340 | return NULL; |
341 | } | 341 | } |