diff options
author | Christoph Hellwig <hch@lst.de> | 2018-12-02 17:46:27 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-12-04 11:38:19 -0700 |
commit | 376f7ef8bfeaee3993c2e85df1bbaa06725b9342 (patch) | |
tree | 9a7bf2119d51f020f30f2426ecde3af333c4ea07 /block | |
parent | 529262d56dbebe6a26df5d2fd24cc0e1bc8579e5 (diff) | |
download | linux-stable-376f7ef8bfeaee3993c2e85df1bbaa06725b9342.tar.gz linux-stable-376f7ef8bfeaee3993c2e85df1bbaa06725b9342.tar.bz2 linux-stable-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')
-rw-r--r-- | block/blk-sysfs.c | 2 |
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); |