block: misplaced rq_complete tracepoint
authorHannes Reinecke <hare@suse.de>
Wed, 1 Oct 2014 12:32:31 +0000 (14:32 +0200)
committerJens Axboe <axboe@fb.com>
Wed, 1 Oct 2014 14:17:42 +0000 (08:17 -0600)
The rq_complete tracepoint was never issued for empty requests,
causing the resulting blktrace information to never show any
completion for those request.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-core.c

index e1c2775c75972b64347c3f86350c60ea461510c4..4aa9ccd02a509b644a5c0c6e551b1aabd53f28f5 100644 (file)
@@ -2400,11 +2400,11 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
 {
        int total_bytes;
 
+       trace_block_rq_complete(req->q, req, nr_bytes);
+
        if (!req->bio)
                return false;
 
-       trace_block_rq_complete(req->q, req, nr_bytes);
-
        /*
         * For fs requests, rq is just carrier of independent bio's
         * and each partial completion should be handled separately.