]> git.ipfire.org Git - thirdparty/kernel/stable.git/blobdiff - drivers/scsi/scsi_lib.c
blk-mq: don't handle failure in .get_budget
[thirdparty/kernel/stable.git] / drivers / scsi / scsi_lib.c
index 22a7e4c47207a722b3a1b554cbeaafd7b68fc39a..286ea983c9e3560db7d1a8099a9c5c942b0ea675 100644 (file)
@@ -1955,27 +1955,22 @@ static void scsi_mq_put_budget(struct blk_mq_hw_ctx *hctx)
        put_device(&sdev->sdev_gendev);
 }
 
-static blk_status_t scsi_mq_get_budget(struct blk_mq_hw_ctx *hctx)
+static bool scsi_mq_get_budget(struct blk_mq_hw_ctx *hctx)
 {
        struct request_queue *q = hctx->queue;
        struct scsi_device *sdev = q->queuedata;
-       blk_status_t ret;
-
-       ret = prep_to_mq(scsi_prep_state_check(sdev, NULL));
-       if (ret == BLK_STS_RESOURCE || ret != BLK_STS_OK)
-               return ret;
 
        if (!get_device(&sdev->sdev_gendev))
                goto out;
        if (!scsi_dev_queue_ready(q, sdev))
                goto out_put_device;
 
-       return BLK_STS_OK;
+       return true;
 
 out_put_device:
        put_device(&sdev->sdev_gendev);
 out:
-       return BLK_STS_RESOURCE;
+       return false;
 }
 
 static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx,