diff options
author | Kiyoshi Ueda <k-ueda@ct.jp.nec.com> | 2008-01-18 12:02:15 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-30 14:03:41 -0500 |
commit | b8de16318410f6f8611a879678a531237e4aadc9 (patch) | |
tree | 3451b3bb3ccd95d17ebe246d455a90a5d4fb172b | |
parent | 6f9a35e2dafa0f855ab051c11bdbf739745ff6f5 (diff) |
[SCSI] bidirectional: fix up for the new blk_end_request code
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r-- | drivers/scsi/scsi_lib.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 681ed1b830f..4560713ecb1 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -812,8 +812,16 @@ EXPORT_SYMBOL(scsi_release_buffers); | |||
812 | */ | 812 | */ |
813 | void scsi_end_bidi_request(struct scsi_cmnd *cmd) | 813 | void scsi_end_bidi_request(struct scsi_cmnd *cmd) |
814 | { | 814 | { |
815 | blk_end_bidi_request(cmd->request, 0, scsi_out(cmd)->resid, | 815 | struct request *req = cmd->request; |
816 | scsi_in(cmd)->resid); | 816 | unsigned int dlen = req->data_len; |
817 | unsigned int next_dlen = req->next_rq->data_len; | ||
818 | |||
819 | req->data_len = scsi_out(cmd)->resid; | ||
820 | req->next_rq->data_len = scsi_in(cmd)->resid; | ||
821 | |||
822 | /* The req and req->next_rq have not been completed */ | ||
823 | BUG_ON(blk_end_bidi_request(req, 0, dlen, next_dlen)); | ||
824 | |||
817 | scsi_release_buffers(cmd); | 825 | scsi_release_buffers(cmd); |
818 | 826 | ||
819 | /* | 827 | /* |