diff options
author | Christoph Hellwig <hch@lst.de> | 2021-07-24 09:20:24 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-07-29 04:24:26 +0200 |
commit | 2cece3778475abc855084d897a3cf61249798ad9 (patch) | |
tree | 41ee0566abd6f4bc8193a9d7a0c3c982c3ef8bd9 /drivers/scsi/scsi_lib.c | |
parent | scsi: bsg: Move bsg_scsi_ops to drivers/scsi/ (diff) | |
download | linux-2cece3778475abc855084d897a3cf61249798ad9.tar.xz linux-2cece3778475abc855084d897a3cf61249798ad9.zip |
scsi: scsi_ioctl: Remove scsi_req_init()
Merge scsi_req_init() into its only caller.
Link: https://lore.kernel.org/r/20210724072033.1284840-16-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 7456a26aef51..77578b221a71 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1083,8 +1083,13 @@ EXPORT_SYMBOL(scsi_alloc_sgtables); static void scsi_initialize_rq(struct request *rq) { struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq); + struct scsi_request *req = &cmd->req; + + memset(req->__cmd, 0, sizeof(req->__cmd)); + req->cmd = req->__cmd; + req->cmd_len = BLK_MAX_CDB; + req->sense_len = 0; - scsi_req_init(&cmd->req); init_rcu_head(&cmd->rcu); cmd->jiffies_at_alloc = jiffies; cmd->retries = 0; |