Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx> --- kernel/trace/blktrace.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 51c10d86aa92..0a9b491bac9e 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -1417,11 +1417,20 @@ static void blk_add_trace_getrq(void *ignore, struct bio *bio) static void blk_add_trace_plug(void *ignore, struct request_queue *q) { struct blk_trace *bt; + struct blk_trace_ext *bte; rcu_read_lock(); bt = rcu_dereference(q->blk_trace); + bte = rcu_dereference(q->blk_trace_ext); + if (likely(!bt) && likely(!bte)) { + rcu_read_unlock(); + return; + } if (bt) __blk_add_trace(bt, 0, 0, 0, 0, BLK_TA_PLUG, 0, 0, NULL, 0); + else if (bte) + __blk_add_trace_ext(bte, 0, 0, 0, 0, BLK_TA_PLUG_EXT, 0, 0, + NULL, 0, 0); rcu_read_unlock(); } -- 2.22.1