mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
[SCSI] tgt: set the data length properly
scsi_tgt uses REQ_TYPE_BLOCK_PC so scsi_init_io doesn't set the length for us. scsi_tgt needs to do it by itself. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
parent
36802e9989
commit
cccddc2d15
1 changed files with 5 additions and 0 deletions
|
@ -381,6 +381,11 @@ static int scsi_map_user_pages(struct scsi_tgt_cmd *tcmd, struct scsi_cmnd *cmd,
|
|||
scsi_release_buffers(cmd);
|
||||
goto unmap_rq;
|
||||
}
|
||||
/*
|
||||
* we use REQ_TYPE_BLOCK_PC so scsi_init_io doesn't set the
|
||||
* length for us.
|
||||
*/
|
||||
cmd->sdb.length = rq->data_len;
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue