Commit b8de1631 authored by Kiyoshi Ueda's avatar Kiyoshi Ueda Committed by James Bottomley

[SCSI] bidirectional: fix up for the new blk_end_request code

Signed-off-by: default avatarKiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: default avatarJun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 6f9a35e2
...@@ -812,8 +812,16 @@ EXPORT_SYMBOL(scsi_release_buffers); ...@@ -812,8 +812,16 @@ EXPORT_SYMBOL(scsi_release_buffers);
*/ */
void scsi_end_bidi_request(struct scsi_cmnd *cmd) void scsi_end_bidi_request(struct scsi_cmnd *cmd)
{ {
blk_end_bidi_request(cmd->request, 0, scsi_out(cmd)->resid, struct request *req = cmd->request;
scsi_in(cmd)->resid); unsigned int dlen = req->data_len;
unsigned int next_dlen = req->next_rq->data_len;
req->data_len = scsi_out(cmd)->resid;
req->next_rq->data_len = scsi_in(cmd)->resid;
/* The req and req->next_rq have not been completed */
BUG_ON(blk_end_bidi_request(req, 0, dlen, next_dlen));
scsi_release_buffers(cmd); scsi_release_buffers(cmd);
/* /*
......
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