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/block/xen-blkfront.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/block/xen-blkfront.c')
-rw-r--r-- | drivers/block/xen-blkfront.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 8f905089b72b..cd6cfe3b51e1 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c | |||
@@ -551,7 +551,6 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id) | |||
551 | 551 | ||
552 | for (i = info->ring.rsp_cons; i != rp; i++) { | 552 | for (i = info->ring.rsp_cons; i != rp; i++) { |
553 | unsigned long id; | 553 | unsigned long id; |
554 | int ret; | ||
555 | 554 | ||
556 | bret = RING_GET_RESPONSE(&info->ring, i); | 555 | bret = RING_GET_RESPONSE(&info->ring, i); |
557 | id = bret->id; | 556 | id = bret->id; |
@@ -578,8 +577,7 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id) | |||
578 | dev_dbg(&info->xbdev->dev, "Bad return from blkdev data " | 577 | dev_dbg(&info->xbdev->dev, "Bad return from blkdev data " |
579 | "request: %x\n", bret->status); | 578 | "request: %x\n", bret->status); |
580 | 579 | ||
581 | ret = __blk_end_request(req, error, blk_rq_bytes(req)); | 580 | __blk_end_request_all(req, error); |
582 | BUG_ON(ret); | ||
583 | break; | 581 | break; |
584 | default: | 582 | default: |
585 | BUG(); | 583 | BUG(); |