scsi: core: Remove the request member from struct scsi_cmnd
authorBart Van Assche <bvanassche@acm.org>
Mon, 9 Aug 2021 23:03:55 +0000 (16:03 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 12 Aug 2021 02:25:42 +0000 (22:25 -0400)
Since all scsi_cmnd.request users are gone, remove the request pointer
from struct scsi_cmnd.

Link: https://lore.kernel.org/r/20210809230355.8186-53-bvanassche@acm.org
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_error.c
drivers/scsi/scsi_lib.c
include/scsi/scsi_cmnd.h

index d85d308a068343a7d3c093c8e0a89a3d38c43026..b6c86cce57bfa2ecf9ce2ee52b5d39fa2f67d790 100644 (file)
@@ -2377,7 +2377,6 @@ scsi_ioctl_reset(struct scsi_device *dev, int __user *arg)
 
        scmd = (struct scsi_cmnd *)(rq + 1);
        scsi_init_command(dev, scmd);
-       scmd->request = rq;
        scmd->cmnd = scsi_req(rq)->cmd;
 
        scmd->scsi_done         = scsi_reset_provider_done_command;
index 909a422ec8f437ee3de796e30abe161660b1fd47..9ba1aa7530a9fe8bdf32f453b91aa0ff77af9f78 100644 (file)
@@ -1540,7 +1540,6 @@ static blk_status_t scsi_prepare_cmd(struct request *req)
 
        scsi_init_command(sdev, cmd);
 
-       cmd->request = req;
        cmd->tag = req->tag;
        cmd->prot_op = SCSI_PROT_NORMAL;
        if (blk_rq_bytes(req))
index b9265b15d37ac233bc302427dc7553b83b8fea3b..ddc9671b325b4c5261fa13f9f0a1e76de982444e 100644 (file)
@@ -111,9 +111,6 @@ struct scsi_cmnd {
                                   reconnects.   Probably == sector
                                   size */
 
-       struct request *request;        /* The command we are
-                                          working on */
-
        unsigned char *sense_buffer;
                                /* obtained by REQUEST SENSE when
                                 * CHECK CONDITION is received on original