]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - block/elevator.c
net: bcmgenet: Poll internal PHY for GENETv5
[mirror_ubuntu-bionic-kernel.git] / block / elevator.c
index 7bda083d59684177bb66eec2e221177417c893ac..4dead1ae1270d7fae7b7443d3659b25b99aee3b1 100644 (file)
@@ -640,7 +640,7 @@ void elv_drain_elevator(struct request_queue *q)
 
        while (e->type->ops.sq.elevator_dispatch_fn(q, 1))
                ;
-       if (q->nr_sorted && printed++ < 10) {
+       if (q->nr_sorted && !blk_queue_is_zoned(q) && printed++ < 10 ) {
                printk(KERN_ERR "%s: forced dispatching is broken "
                       "(nr_sorted=%u), please report this\n",
                       q->elevator->type->elevator_name, q->nr_sorted);
@@ -1079,8 +1079,11 @@ static int __elevator_change(struct request_queue *q, const char *name)
        /*
         * Special case for mq, turn off scheduling
         */
-       if (q->mq_ops && !strncmp(name, "none", 4))
+       if (q->mq_ops && !strncmp(name, "none", 4)) {
+               if (!q->elevator)
+                       return 0;
                return elevator_switch(q, NULL);
+       }
 
        strlcpy(elevator_name, name, sizeof(elevator_name));
        e = elevator_get(q, strstrip(elevator_name), true);