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 d85d308..b6c86cc 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 909a422..9ba1aa7 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 b9265b1..ddc9671 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