Skip to content

Commit e97a294

Browse files
author
Jens Axboe
committed
scsi: missing add of padded bytes to io completion byte count
Original patch from Tejun Heo <htejun@gmail.com> but should use ->extra_len and not ->data_len, as we would then overshoot the original request size. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
1 parent 87baa2b commit e97a294

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/scsi/scsi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ void scsi_finish_command(struct scsi_cmnd *cmd)
757757
"Notifying upper driver of completion "
758758
"(result %x)\n", cmd->result));
759759

760-
good_bytes = scsi_bufflen(cmd);
760+
good_bytes = scsi_bufflen(cmd) + cmd->request->extra_len;
761761
if (cmd->request->cmd_type != REQ_TYPE_BLOCK_PC) {
762762
drv = scsi_cmd_to_driver(cmd);
763763
if (drv->done)

0 commit comments

Comments
 (0)