Commit e97a294e authored by Jens Axboe's avatar Jens Axboe

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: default avatarJens Axboe <jens.axboe@oracle.com>
parent 87baa2bb
...@@ -757,7 +757,7 @@ void scsi_finish_command(struct scsi_cmnd *cmd) ...@@ -757,7 +757,7 @@ void scsi_finish_command(struct scsi_cmnd *cmd)
"Notifying upper driver of completion " "Notifying upper driver of completion "
"(result %x)\n", cmd->result)); "(result %x)\n", cmd->result));
good_bytes = scsi_bufflen(cmd); good_bytes = scsi_bufflen(cmd) + cmd->request->extra_len;
if (cmd->request->cmd_type != REQ_TYPE_BLOCK_PC) { if (cmd->request->cmd_type != REQ_TYPE_BLOCK_PC) {
drv = scsi_cmd_to_driver(cmd); drv = scsi_cmd_to_driver(cmd);
if (drv->done) if (drv->done)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment