aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/scsi_lib.c8
-rw-r--r--drivers/scsi/st.c6
2 files changed, 12 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 365843a1561f..3e136bfe4219 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1247,7 +1247,13 @@ static int scsi_issue_flush_fn(request_queue_t *q, struct gendisk *disk,
1247static void scsi_generic_done(struct scsi_cmnd *cmd) 1247static void scsi_generic_done(struct scsi_cmnd *cmd)
1248{ 1248{
1249 BUG_ON(!blk_pc_request(cmd->request)); 1249 BUG_ON(!blk_pc_request(cmd->request));
1250 scsi_io_completion(cmd, cmd->result == 0 ? cmd->bufflen : 0, 0); 1250 /*
1251 * This will complete the whole command with uptodate=1 so
1252 * as far as the block layer is concerned the command completed
1253 * successfully. Since this is a REQ_BLOCK_PC command the
1254 * caller should check the request's errors value
1255 */
1256 scsi_io_completion(cmd, cmd->bufflen, 0);
1251} 1257}
1252 1258
1253static int scsi_prep_fn(struct request_queue *q, struct request *req) 1259static int scsi_prep_fn(struct request_queue *q, struct request *req)
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 6d9078705c5b..053444b027d4 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -4185,7 +4185,11 @@ static void scsi_tape_release(struct kref *kref)
4185 4185
4186static void st_intr(struct scsi_cmnd *SCpnt) 4186static void st_intr(struct scsi_cmnd *SCpnt)
4187{ 4187{
4188 scsi_io_completion(SCpnt, (SCpnt->result ? 0: SCpnt->bufflen), 1); 4188 /*
4189 * The caller should be checking the request's errors
4190 * value.
4191 */
4192 scsi_io_completion(SCpnt, SCpnt->bufflen, 0);
4189} 4193}
4190 4194
4191/* 4195/*