From: Hannes Reinecke Date: Wed, 1 Oct 2014 12:32:31 +0000 (+0200) Subject: block: misplaced rq_complete tracepoint X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4a0efdc933680d908de11712a774a2c9492c3d5a;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git block: misplaced rq_complete tracepoint 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 Acked-by: Tejun Heo Signed-off-by: Jens Axboe --- diff --git a/block/blk-core.c b/block/blk-core.c index e1c2775c7597..4aa9ccd02a50 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -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.