aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_tgt_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_tgt_lib.c')
-rw-r--r--drivers/scsi/scsi_tgt_lib.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c
index 3677fbb30b72..a0f308bd145b 100644
--- a/drivers/scsi/scsi_tgt_lib.c
+++ b/drivers/scsi/scsi_tgt_lib.c
@@ -103,7 +103,6 @@ struct scsi_cmnd *scsi_host_get_command(struct Scsi_Host *shost,
103 if (!cmd) 103 if (!cmd)
104 goto release_rq; 104 goto release_rq;
105 105
106 memset(cmd, 0, sizeof(*cmd));
107 cmd->sc_data_direction = data_dir; 106 cmd->sc_data_direction = data_dir;
108 cmd->jiffies_at_alloc = jiffies; 107 cmd->jiffies_at_alloc = jiffies;
109 cmd->request = rq; 108 cmd->request = rq;
@@ -382,6 +381,11 @@ static int scsi_map_user_pages(struct scsi_tgt_cmd *tcmd, struct scsi_cmnd *cmd,
382 scsi_release_buffers(cmd); 381 scsi_release_buffers(cmd);
383 goto unmap_rq; 382 goto unmap_rq;
384 } 383 }
384 /*
385 * we use REQ_TYPE_BLOCK_PC so scsi_init_io doesn't set the
386 * length for us.
387 */
388 cmd->sdb.length = rq->data_len;
385 389
386 return 0; 390 return 0;
387 391