aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-08-08 05:06:45 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 02:56:00 -0400
commit051cc3952a8fb6fa875a4eff68d06cf42207dcf4 (patch)
tree349871365796b43dedf10b5305d3dda98a05f57d
parenta9c701e594669dd49fed448c27c64f20cfacc8a7 (diff)
block: use bio_has_data() in the IO completion path
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-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 54e442ba44aa..b5776c1fd52a 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,
1885 struct request_queue *q = rq->q; 1885 struct request_queue *q = rq->q;
1886 unsigned long flags = 0UL; 1886 unsigned long flags = 0UL;
1887 1887
1888 if (blk_fs_request(rq) || blk_pc_request(rq)) { 1888 if (bio_has_data(rq->bio)) {
1889 if (__end_that_request_first(rq, error, nr_bytes)) 1889 if (__end_that_request_first(rq, error, nr_bytes))
1890 return 1; 1890 return 1;
1891 1891
@@ -1943,10 +1943,9 @@ EXPORT_SYMBOL_GPL(blk_end_request);
1943 **/ 1943 **/
1944int __blk_end_request(struct request *rq, int error, unsigned int nr_bytes) 1944int __blk_end_request(struct request *rq, int error, unsigned int nr_bytes)
1945{ 1945{
1946 if (blk_fs_request(rq) || blk_pc_request(rq)) { 1946 if (bio_has_data(rq->bio) &&
1947 if (__end_that_request_first(rq, error, nr_bytes)) 1947 __end_that_request_first(rq, error, nr_bytes))
1948 return 1; 1948 return 1;
1949 }
1950 1949
1951 add_disk_randomness(rq->rq_disk); 1950 add_disk_randomness(rq->rq_disk);
1952 1951