summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-03-04 20:22:54 +0100
committerJens Axboe <jens.axboe@oracle.com>2008-03-04 20:24:05 +0100
commite97a294ef6938512b655b1abf17656cf2b26f709 (patch)
treeedd25900b25c853540cdaeca4f1d2b10fc560493 /drivers/scsi/scsi.c
parent87baa2bb904ed46f872385fe430b6cfb80967835 (diff)
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>
Diffstat (limited to 'drivers/scsi/scsi.c')
-rw-r--r--drivers/scsi/scsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index fecba05b4e7..e5c6f6af876 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -757,7 +757,7 @@ void scsi_finish_command(struct scsi_cmnd *cmd)
"Notifying upper driver of completion "
"(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) {
drv = scsi_cmd_to_driver(cmd);
if (drv->done)