diff options
author | Tejun Heo <tj@kernel.org> | 2009-04-22 22:05:19 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-04-28 01:37:35 -0400 |
commit | 40cbbb781d3eba5d6ac0860db078af490e5c7c6b (patch) | |
tree | dec374543cf045fc630bccddbb7646c695094b0d /drivers/scsi/scsi_lib.c | |
parent | b243ddcbe9be146172baa544dadecebf156eda0e (diff) |
block: implement and use [__]blk_end_request_all()
There are many [__]blk_end_request() call sites which call it with
full request length and expect full completion. Many of them ensure
that the request actually completes by doing BUG_ON() the return
value, which is awkward and error-prone.
This patch adds [__]blk_end_request_all() which takes @rq and @error
and fully completes the request. BUG_ON() is added to to ensure that
this actually happens.
Most conversions are simple but there are a few noteworthy ones.
* cdrom/viocd: viocd_end_request() replaced with direct calls to
__blk_end_request_all().
* s390/block/dasd: dasd_end_request() replaced with direct calls to
__blk_end_request_all().
* s390/char/tape_block: tapeblock_end_request() replaced with direct
calls to blk_end_request_all().
[ Impact: cleanup ]
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Mike Miller <mike.miller@hp.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Alex Dubov <oakad@yahoo.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index d1cb64ad1a3f..756ac7c93de0 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -922,7 +922,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) | |||
922 | if (driver_byte(result) & DRIVER_SENSE) | 922 | if (driver_byte(result) & DRIVER_SENSE) |
923 | scsi_print_sense("", cmd); | 923 | scsi_print_sense("", cmd); |
924 | } | 924 | } |
925 | blk_end_request(req, -EIO, blk_rq_bytes(req)); | 925 | blk_end_request_all(req, -EIO); |
926 | scsi_next_command(cmd); | 926 | scsi_next_command(cmd); |
927 | break; | 927 | break; |
928 | case ACTION_REPREP: | 928 | case ACTION_REPREP: |