]> git.ipfire.org Git - thirdparty/kernel/stable.git/blobdiff - block/blk-mq.c
block: Remove BLK_STS_ZONE_RESOURCE
[thirdparty/kernel/stable.git] / block / blk-mq.c
index 6f9cc1c4d4fb32de68d92a513325bff2923af785..9f2d9970eeba0b2fbc4d660d9a893073c8390908 100644 (file)
@@ -1921,19 +1921,6 @@ static void blk_mq_handle_dev_resource(struct request *rq,
        __blk_mq_requeue_request(rq);
 }
 
-static void blk_mq_handle_zone_resource(struct request *rq,
-                                       struct list_head *zone_list)
-{
-       /*
-        * If we end up here it is because we cannot dispatch a request to a
-        * specific zone due to LLD level zone-write locking or other zone
-        * related resource not being available. In this case, set the request
-        * aside in zone_list for retrying it later.
-        */
-       list_add(&rq->queuelist, zone_list);
-       __blk_mq_requeue_request(rq);
-}
-
 enum prep_dispatch {
        PREP_DISPATCH_OK,
        PREP_DISPATCH_NO_TAG,
@@ -2019,7 +2006,6 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list,
        struct request *rq;
        int queued;
        blk_status_t ret = BLK_STS_OK;
-       LIST_HEAD(zone_list);
        bool needs_resource = false;
 
        if (list_empty(list))
@@ -2061,23 +2047,11 @@ bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list,
                case BLK_STS_DEV_RESOURCE:
                        blk_mq_handle_dev_resource(rq, list);
                        goto out;
-               case BLK_STS_ZONE_RESOURCE:
-                       /*
-                        * Move the request to zone_list and keep going through
-                        * the dispatch list to find more requests the drive can
-                        * accept.
-                        */
-                       blk_mq_handle_zone_resource(rq, &zone_list);
-                       needs_resource = true;
-                       break;
                default:
                        blk_mq_end_request(rq, ret);
                }
        } while (!list_empty(list));
 out:
-       if (!list_empty(&zone_list))
-               list_splice_tail_init(&zone_list, list);
-
        /* If we didn't flush the entire list, we could have told the driver
         * there was more coming, but that turned out to be a lie.
         */