[PATCH 32/39] scsi: unwind blk_end_request_all and blk_end_request_err calls

Christoph Hellwig
2014-03-17T13:28:05Z

[-- Attachment #1: 0032-scsi-unwind-blk_end_request_all-and-blk_end_request_.patch --]
[-- Type: text/plain, Size: 1195 bytes --]

Calling blk_end_request directly with the helpers to get the right amount
will make the conversion to blk-mq easier as we only have one place to
switch between the different completion functions. It also makes the
intention a little more clear to me, but that's a minor side effect.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/scsi/scsi_lib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index cd82e4c..94d5893 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -808,7 +808,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
* Kill remainder if no retrys.
*/
if (error && scsi_noretry_cmd(cmd)) {
- blk_end_request_all(req, error);
+ blk_end_request(req, error, blk_rq_bytes(req));
goto next_command;
}

@@ -948,7 +948,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
scsi_print_sense("", cmd);
scsi_print_command(cmd);
}
- if (!blk_end_request_err(req, error))
+ if (!blk_end_request(req, error, blk_rq_err_bytes(req)))
goto next_command;
/*FALLTHRU*/
case ACTION_REPREP:
--
1.7.10.4