From 88260ffc68ad46eaaf2d2af091a00873e52463c4 Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Fri, 11 Nov 2005 05:31:40 -0600 Subject: [PATCH] --- yaml --- r: 15653 b: refs/heads/master c: 0d95716d6a1308c465d8c17ed1a217628936bb0c h: refs/heads/master i: 15651: eb1998c66b0ac27cbe4cabe5c76f7b3b75f94dae v: v3 --- [refs] | 2 +- trunk/drivers/scsi/scsi_lib.c | 8 +++++++- trunk/drivers/scsi/st.c | 6 +++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index b79caeb99c51..cd3b77121306 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 17e01f216b611fc46956dcd9063aec4de75991e3 +refs/heads/master: 0d95716d6a1308c465d8c17ed1a217628936bb0c diff --git a/trunk/drivers/scsi/scsi_lib.c b/trunk/drivers/scsi/scsi_lib.c index 365843a1561f..3e136bfe4219 100644 --- a/trunk/drivers/scsi/scsi_lib.c +++ b/trunk/drivers/scsi/scsi_lib.c @@ -1247,7 +1247,13 @@ static int scsi_issue_flush_fn(request_queue_t *q, struct gendisk *disk, static void scsi_generic_done(struct scsi_cmnd *cmd) { BUG_ON(!blk_pc_request(cmd->request)); - scsi_io_completion(cmd, cmd->result == 0 ? cmd->bufflen : 0, 0); + /* + * This will complete the whole command with uptodate=1 so + * as far as the block layer is concerned the command completed + * successfully. Since this is a REQ_BLOCK_PC command the + * caller should check the request's errors value + */ + scsi_io_completion(cmd, cmd->bufflen, 0); } static int scsi_prep_fn(struct request_queue *q, struct request *req) diff --git a/trunk/drivers/scsi/st.c b/trunk/drivers/scsi/st.c index 6d9078705c5b..053444b027d4 100644 --- a/trunk/drivers/scsi/st.c +++ b/trunk/drivers/scsi/st.c @@ -4185,7 +4185,11 @@ static void scsi_tape_release(struct kref *kref) static void st_intr(struct scsi_cmnd *SCpnt) { - scsi_io_completion(SCpnt, (SCpnt->result ? 0: SCpnt->bufflen), 1); + /* + * The caller should be checking the request's errors + * value. + */ + scsi_io_completion(SCpnt, SCpnt->bufflen, 0); } /*