summaryrefslogtreecommitdiff
path: root/block/blk-sysfs.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-12-02 17:46:27 +0100
committerJens Axboe <axboe@kernel.dk>2018-12-04 11:38:19 -0700
commit376f7ef8bfeaee3993c2e85df1bbaa06725b9342 (patch)
tree9a7bf2119d51f020f30f2426ecde3af333c4ea07 /block/blk-sysfs.c
parent529262d56dbebe6a26df5d2fd24cc0e1bc8579e5 (diff)
downloadlwn-376f7ef8bfeaee3993c2e85df1bbaa06725b9342.tar.gz
lwn-376f7ef8bfeaee3993c2e85df1bbaa06725b9342.zip
block: only allow polling if a poll queue_map exists
This avoids having to have differnet mq_ops for different setups with or without poll queues. Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r--block/blk-sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 9f0cb370b39b..bb7c642ffefa 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -402,7 +402,7 @@ static ssize_t queue_poll_store(struct request_queue *q, const char *page,
unsigned long poll_on;
ssize_t ret;
- if (!q->mq_ops || !q->mq_ops->poll)
+ if (!q->tag_set || q->tag_set->nr_maps <= HCTX_TYPE_POLL)
return -EINVAL;
ret = queue_var_store(&poll_on, page, count);