diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2008-08-26 11:34:34 (GMT) |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 06:56:09 (GMT) |
commit | 605401618ce4409045bc4db86e88d4b38f2ad585 (patch) | |
tree | 1abcf85f04c407c5f18268c1e84acb99244a7e38 /block | |
parent | ab780f1ece0dc8d5e8e8e85435acc5e4747ccda3 (diff) | |
download | linux-605401618ce4409045bc4db86e88d4b38f2ad585.tar.xz |
block: don't use bio_has_data() in the completion path
We should just check for rq->bio, as that is really the information
we are looking for. Even if the bio attached doesn't carry data,
we still need to do IO post processing on it.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-core.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index b9a252c..5bf806a 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1817,7 +1817,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 (bio_has_data(rq->bio) || blk_discard_rq(rq)) { + if (rq->bio) { if (__end_that_request_first(rq, error, nr_bytes)) return 1; @@ -1875,8 +1875,7 @@ EXPORT_SYMBOL_GPL(blk_end_request); **/ int __blk_end_request(struct request *rq, int error, unsigned int nr_bytes) { - if ((bio_has_data(rq->bio) || blk_discard_rq(rq)) && - __end_that_request_first(rq, error, nr_bytes)) + if (rq->bio && __end_that_request_first(rq, error, nr_bytes)) return 1; add_disk_randomness(rq->rq_disk); |