summaryrefslogtreecommitdiff
path: root/drivers/md/dm-table.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-11-15 22:22:51 +0300
committerJens Axboe <axboe@kernel.dk>2018-11-16 18:34:06 +0300
commit344e9ffcbd1898e1dc04085564a6e05c30ea8199 (patch)
treeba71320bc66d1158790acf1cdeedd21d2da9dead /drivers/md/dm-table.c
parentdabcefab45d36ecb5a22f16577bb0f298876a22d (diff)
downloadlinux-344e9ffcbd1898e1dc04085564a6e05c30ea8199.tar.xz
block: add queue_is_mq() helper
Various spots check for q->mq_ops being non-NULL, but provide a helper to do this instead. Where the ->mq_ops != NULL check is redundant, remove it. Since mq == rq-based now that legacy is gone, get rid of the queue_is_rq_based() and just use queue_is_mq() everywhere. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r--drivers/md/dm-table.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 9038c302d5c2..844f7d0f2ef8 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -919,12 +919,12 @@ static int device_is_rq_based(struct dm_target *ti, struct dm_dev *dev,
struct request_queue *q = bdev_get_queue(dev->bdev);
struct verify_rq_based_data *v = data;
- if (q->mq_ops)
+ if (queue_is_mq(q))
v->mq_count++;
else
v->sq_count++;
- return queue_is_rq_based(q);
+ return queue_is_mq(q);
}
static int dm_table_determine_type(struct dm_table *t)