Skip to content

Commit

Permalink
blk-throttle: use queue_is_rq_based
Browse files Browse the repository at this point in the history
use queue_is_rq_based instead of open code.

Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
weiping zhang authored and axboe committed Jan 20, 2018
1 parent f5ced52 commit 475a055
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-throttle.c
Original file line number Diff line number Diff line change
Expand Up @@ -2489,7 +2489,7 @@ void blk_throtl_register_queue(struct request_queue *q)
td->throtl_slice = DFL_THROTL_SLICE_HD;
#endif

td->track_bio_latency = !q->mq_ops && !q->request_fn;
td->track_bio_latency = !queue_is_rq_based(q);
if (!td->track_bio_latency)
blk_stat_enable_accounting(q);
}
Expand Down

0 comments on commit 475a055

Please sign in to comment.