aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/st.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r--drivers/scsi/st.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 1871b8ae83a..9b28f39bac2 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -462,14 +462,16 @@ static void st_scsi_execute_end(struct request *req, int uptodate)
462{ 462{
463 struct st_request *SRpnt = req->end_io_data; 463 struct st_request *SRpnt = req->end_io_data;
464 struct scsi_tape *STp = SRpnt->stp; 464 struct scsi_tape *STp = SRpnt->stp;
465 struct bio *tmp;
465 466
466 STp->buffer->cmdstat.midlevel_result = SRpnt->result = req->errors; 467 STp->buffer->cmdstat.midlevel_result = SRpnt->result = req->errors;
467 STp->buffer->cmdstat.residual = req->resid_len; 468 STp->buffer->cmdstat.residual = req->resid_len;
468 469
470 tmp = SRpnt->bio;
469 if (SRpnt->waiting) 471 if (SRpnt->waiting)
470 complete(SRpnt->waiting); 472 complete(SRpnt->waiting);
471 473
472 blk_rq_unmap_user(SRpnt->bio); 474 blk_rq_unmap_user(tmp);
473 __blk_put_request(req->q, req); 475 __blk_put_request(req->q, req);
474} 476}
475 477