diff options
author | Tejun Heo <tj@kernel.org> | 2011-12-14 00:33:37 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2011-12-14 00:33:37 +0100 |
commit | 34f6055c80285e4efb3f602a9119db75239744dc (patch) | |
tree | eb05185976c1941d196d259c3dfc2a4cfa7469d1 /block/blk-sysfs.c | |
parent | 1ba64edef6051d2ec79bb2fbd3a0c8f0df00ab55 (diff) | |
download | op-kernel-dev-34f6055c80285e4efb3f602a9119db75239744dc.zip op-kernel-dev-34f6055c80285e4efb3f602a9119db75239744dc.tar.gz |
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-sysfs.c')
-rw-r--r-- | block/blk-sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index e7f9f65..f0b2ca8 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -425,7 +425,7 @@ queue_attr_show(struct kobject *kobj, struct attribute *attr, char *page) if (!entry->show) return -EIO; mutex_lock(&q->sysfs_lock); - if (test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)) { + if (blk_queue_dead(q)) { mutex_unlock(&q->sysfs_lock); return -ENOENT; } @@ -447,7 +447,7 @@ queue_attr_store(struct kobject *kobj, struct attribute *attr, q = container_of(kobj, struct request_queue, kobj); mutex_lock(&q->sysfs_lock); - if (test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)) { + if (blk_queue_dead(q)) { mutex_unlock(&q->sysfs_lock); return -ENOENT; } |