summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-08-08 11:06:45 +0200
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 08:56:00 +0200
commit051cc3952a8fb6fa875a4eff68d06cf42207dcf4 (patch)
tree349871365796b43dedf10b5305d3dda98a05f57d /block
parenta9c701e594669dd49fed448c27c64f20cfacc8a7 (diff)
downloadop-kernel-dev-051cc3952a8fb6fa875a4eff68d06cf42207dcf4.zip
op-kernel-dev-051cc3952a8fb6fa875a4eff68d06cf42207dcf4.tar.gz
block: use bio_has_data() in the IO completion path
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r--block/blk-core.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 54e442b..b5776c1 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1885,7 +1885,7 @@ static int blk_end_io(struct request *rq, int error, unsigned int nr_bytes,
struct request_queue *q = rq->q;
unsigned long flags = 0UL;
- if (blk_fs_request(rq) || blk_pc_request(rq)) {
+ if (bio_has_data(rq->bio)) {
if (__end_that_request_first(rq, error, nr_bytes))
return 1;
@@ -1943,10 +1943,9 @@ EXPORT_SYMBOL_GPL(blk_end_request);
**/
int __blk_end_request(struct request *rq, int error, unsigned int nr_bytes)
{
- if (blk_fs_request(rq) || blk_pc_request(rq)) {
- if (__end_that_request_first(rq, error, nr_bytes))
- return 1;
- }
+ if (bio_has_data(rq->bio) &&
+ __end_that_request_first(rq, error, nr_bytes))
+ return 1;
add_disk_randomness(rq->rq_disk);
OpenPOWER on IntegriCloud