summaryrefslogtreecommitdiff
path: root/block/blk-throttle.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-06-27 09:31:58 +0200
committerJens Axboe <axboe@kernel.dk>2020-06-29 09:09:08 -0600
commitdb18a53e5ba840993a3fc908dec648402ed740bd (patch)
treeac817b02802ddc83d978605d1b6a4cf687dc59a1 /block/blk-throttle.c
parent93b8063804b62b55248e16499d853e1b20eff905 (diff)
blk-cgroup: remove blkcg_bio_issue_check
blkcg_bio_issue_check is a giant inline function that does three entirely different things. Factor out the blk-cgroup related bio initalization into a new helper, and the open code the sequence in the only caller, relying on the fact that all the actual functionality is stubbed out for non-cgroup builds. Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-throttle.c')
-rw-r--r--block/blk-throttle.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index ac0083450500..9d00f62c05ec 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -2158,9 +2158,10 @@ static inline void throtl_update_latency_buckets(struct throtl_data *td)
}
#endif
-bool blk_throtl_bio(struct request_queue *q, struct blkcg_gq *blkg,
- struct bio *bio)
+bool blk_throtl_bio(struct bio *bio)
{
+ struct request_queue *q = bio->bi_disk->queue;
+ struct blkcg_gq *blkg = bio->bi_blkg;
struct throtl_qnode *qn = NULL;
struct throtl_grp *tg = blkg_to_tg(blkg ?: q->root_blkg);
struct throtl_service_queue *sq;