]> git.baikalelectronics.ru Git - kernel.git/commitdiff
block: remove unnecessary argument from blk_execute_rq_nowait
authorGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
Mon, 25 Jan 2021 04:49:57 +0000 (05:49 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jan 2021 04:52:39 +0000 (21:52 -0700)
The 'q' is not used since commit 228caa1dcdd4 ("block: remove dead
elevator code"), also update the comment of the function.

And more importantly it never really was needed to start with given
that we can trivial derive it from struct request.

Cc: target-devel@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org
Cc: linux-ide@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
Cc: linux-nvme@lists.infradead.org
Cc: linux-nfs@vger.kernel.org
Signed-off-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-exec.c
drivers/block/sx8.c
drivers/nvme/host/core.c
drivers/nvme/host/lightnvm.c
drivers/nvme/host/pci.c
drivers/nvme/target/passthru.c
drivers/scsi/scsi_error.c
drivers/scsi/sg.c
drivers/scsi/st.c
drivers/target/target_core_pscsi.c
include/linux/blkdev.h

index 85324d53d072f0809c567f98214e1bc552c145c4..2e37e85456fb44f97a27f50a328a8811d9e91d38 100644 (file)
@@ -31,8 +31,7 @@ static void blk_end_sync_rq(struct request *rq, blk_status_t error)
 }
 
 /**
- * blk_execute_rq_nowait - insert a request into queue for execution
- * @q:         queue to insert the request in
+ * blk_execute_rq_nowait - insert a request to I/O scheduler for execution
  * @bd_disk:   matching gendisk
  * @rq:                request to insert
  * @at_head:    insert request at head or tail of queue
@@ -45,9 +44,8 @@ static void blk_end_sync_rq(struct request *rq, blk_status_t error)
  * Note:
  *    This function will invoke @done directly if the queue is dead.
  */
-void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
-                          struct request *rq, int at_head,
-                          rq_end_io_fn *done)
+void blk_execute_rq_nowait(struct gendisk *bd_disk, struct request *rq,
+                          int at_head, rq_end_io_fn *done)
 {
        WARN_ON(irqs_disabled());
        WARN_ON(!blk_rq_is_passthrough(rq));
@@ -83,7 +81,7 @@ void blk_execute_rq(struct request_queue *q, struct gendisk *bd_disk,
        unsigned long hang_check;
 
        rq->end_io_data = &wait;
-       blk_execute_rq_nowait(q, bd_disk, rq, at_head, blk_end_sync_rq);
+       blk_execute_rq_nowait(bd_disk, rq, at_head, blk_end_sync_rq);
 
        /* Prevent hang_check timer from firing at us during very long I/O */
        hang_check = sysctl_hung_task_timeout_secs;
index 4478eb7efee0bfe69ae2e1b5e74cf4e22a8d8424..2cdf2771f8e82f55a865d8fb4de76d685126c0cb 100644 (file)
@@ -539,7 +539,7 @@ static int carm_array_info (struct carm_host *host, unsigned int array_idx)
        spin_unlock_irq(&host->lock);
 
        DPRINTK("blk_execute_rq_nowait, tag == %u\n", rq->tag);
-       blk_execute_rq_nowait(host->oob_q, NULL, rq, true, NULL);
+       blk_execute_rq_nowait(NULL, rq, true, NULL);
 
        return 0;
 
@@ -578,7 +578,7 @@ static int carm_send_special (struct carm_host *host, carm_sspc_t func)
        crq->msg_bucket = (u32) rc;
 
        DPRINTK("blk_execute_rq_nowait, tag == %u\n", rq->tag);
-       blk_execute_rq_nowait(host->oob_q, NULL, rq, true, NULL);
+       blk_execute_rq_nowait(NULL, rq, true, NULL);
 
        return 0;
 }
index a39befb4deba0aa46f34f99f61b4b16eefd9d80f..0bea9ae0309216ade677a2a248eb46c566aeeac8 100644 (file)
@@ -925,7 +925,7 @@ static void nvme_execute_rq_polled(struct request_queue *q,
 
        rq->cmd_flags |= REQ_HIPRI;
        rq->end_io_data = &wait;
-       blk_execute_rq_nowait(q, bd_disk, rq, at_head, nvme_end_sync_rq);
+       blk_execute_rq_nowait(bd_disk, rq, at_head, nvme_end_sync_rq);
 
        while (!completion_done(&wait)) {
                blk_poll(q, request_to_qc_t(rq->mq_hctx, rq), true);
@@ -1202,7 +1202,7 @@ static int nvme_keep_alive(struct nvme_ctrl *ctrl)
        rq->timeout = ctrl->kato * HZ;
        rq->end_io_data = ctrl;
 
-       blk_execute_rq_nowait(rq->q, NULL, rq, 0, nvme_keep_alive_end_io);
+       blk_execute_rq_nowait(NULL, rq, 0, nvme_keep_alive_end_io);
 
        return 0;
 }
index 6c8eab8de28821071ee60b197f334825347486c6..0e5a55075e35e2a01fc1be8635f00b8dd0b131d1 100644 (file)
@@ -695,7 +695,7 @@ static int nvme_nvm_submit_io(struct nvm_dev *dev, struct nvm_rq *rqd,
 
        rq->end_io_data = rqd;
 
-       blk_execute_rq_nowait(q, NULL, rq, 0, nvme_nvm_end_io);
+       blk_execute_rq_nowait(NULL, rq, 0, nvme_nvm_end_io);
 
        return 0;
 
index 856aa31931c140b48ee4066820e9c301de5eb219..5b78e68be9a157205c4ec788740892811ef4fcf1 100644 (file)
@@ -1357,7 +1357,7 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
        }
 
        abort_req->end_io_data = NULL;
-       blk_execute_rq_nowait(abort_req->q, NULL, abort_req, 0, abort_endio);
+       blk_execute_rq_nowait(NULL, abort_req, 0, abort_endio);
 
        /*
         * The aborted req will be completed on receiving the abort req.
@@ -2281,7 +2281,7 @@ static int nvme_delete_queue(struct nvme_queue *nvmeq, u8 opcode)
        req->end_io_data = nvmeq;
 
        init_completion(&nvmeq->delete_done);
-       blk_execute_rq_nowait(q, NULL, req, false,
+       blk_execute_rq_nowait(NULL, req, false,
                        opcode == nvme_admin_delete_cq ?
                                nvme_del_cq_end : nvme_del_queue_end);
        return 0;
index b9776fc8f08f4277f00b6befbd5500d24da656ef..cbc88acdd2336d208c3d5353131cef9b28d0a42f 100644 (file)
@@ -275,7 +275,7 @@ static void nvmet_passthru_execute_cmd(struct nvmet_req *req)
                schedule_work(&req->p.work);
        } else {
                rq->end_io_data = req;
-               blk_execute_rq_nowait(rq->q, ns ? ns->disk : NULL, rq, 0,
+               blk_execute_rq_nowait(ns ? ns->disk : NULL, rq, 0,
                                      nvmet_passthru_req_done);
        }
 
index f11f51e2465f5dea81fef1810d7368e11ff005cb..c00f06e9ecb06646e2324fa0455b17d61220e16b 100644 (file)
@@ -2007,7 +2007,7 @@ static void scsi_eh_lock_door(struct scsi_device *sdev)
        req->timeout = 10 * HZ;
        rq->retries = 5;
 
-       blk_execute_rq_nowait(req->q, NULL, req, 1, eh_lock_door_done);
+       blk_execute_rq_nowait(NULL, req, 1, eh_lock_door_done);
 }
 
 /**
index bfa8d77322d732164ef143dbaa05eff20a96310d..4383d93110f8354cc263c627e8e46dd78b923d14 100644 (file)
@@ -829,8 +829,7 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp,
 
        srp->rq->timeout = timeout;
        kref_get(&sfp->f_ref); /* sg_rq_end_io() does kref_put(). */
-       blk_execute_rq_nowait(sdp->device->request_queue, sdp->disk,
-                             srp->rq, at_head, sg_rq_end_io);
+       blk_execute_rq_nowait(sdp->disk, srp->rq, at_head, sg_rq_end_io);
        return 0;
 }
 
index 43f7624508a96c71f2055cd1239a98f25ac46a5d..841ad2fc369a070b81958f9dcd8688616c24bcea 100644 (file)
@@ -585,7 +585,7 @@ static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd,
        rq->retries = retries;
        req->end_io_data = SRpnt;
 
-       blk_execute_rq_nowait(req->q, NULL, req, 1, st_scsi_execute_end);
+       blk_execute_rq_nowait(NULL, req, 1, st_scsi_execute_end);
        return 0;
 }
 
index 7994f27e45271c486207e198dbba74fd6b2d9760..33770e5808ce5eb27dbf3fc5ee444bc7aa1b3444 100644 (file)
@@ -1000,8 +1000,7 @@ pscsi_execute_cmd(struct se_cmd *cmd)
                req->timeout = PS_TIMEOUT_OTHER;
        scsi_req(req)->retries = PS_RETRY;
 
-       blk_execute_rq_nowait(pdv->pdv_sd->request_queue, NULL, req,
-                       (cmd->sam_task_attr == TCM_HEAD_TAG),
+       blk_execute_rq_nowait(NULL, req, (cmd->sam_task_attr == TCM_HEAD_TAG),
                        pscsi_req_done);
 
        return 0;
index 4526b9ef8edbe3ba525385be03508dc83293bb12..623a61239429a5c8d38451be395e347e7369277e 100644 (file)
@@ -950,7 +950,7 @@ extern int blk_rq_map_user_iov(struct request_queue *, struct request *,
                               gfp_t);
 extern void blk_execute_rq(struct request_queue *, struct gendisk *,
                          struct request *, int);
-extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *,
+extern void blk_execute_rq_nowait(struct gendisk *,
                                  struct request *, int, rq_end_io_fn *);
 
 /* Helper to convert REQ_OP_XXX to its string format XXX */