diff options
Diffstat (limited to 'block/genhd.c')
-rw-r--r-- | block/genhd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/block/genhd.c b/block/genhd.c index 37eb41ee4086..c9a4fc90d3e9 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -412,6 +412,10 @@ int __must_check device_add_disk(struct device *parent, struct gendisk *disk, struct device *ddev = disk_to_dev(disk); int ret; + /* Only makes sense for bio-based to set ->poll_bio */ + if (queue_is_mq(disk->queue) && disk->fops->poll_bio) + return -EINVAL; + /* * The disk queue should now be all set with enough information about * the device for the elevator code to pick an adequate default |