aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-11-02 10:46:15 -0400
committerJens Axboe <axboe@kernel.dk>2018-11-07 15:42:33 -0500
commitdb6d995235606191fa9db0c717e9d843200b71ea (patch)
tree830c338347842ac1b0de76d86fbee6bfd7ff9b32 /block/blk-cgroup.c
parent1028e4b335665290dc563d5272f3c6b84e7fd66e (diff)
block: remove request_list code
It's now dead code, nobody uses it. Reviewed-by: Hannes Reinecke <hare@suse.com> Tested-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r--block/blk-cgroup.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 41b2470042d1..6c65791bc3fe 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -76,9 +76,6 @@ static void blkg_free(struct blkcg_gq *blkg)
76 if (blkg->pd[i]) 76 if (blkg->pd[i])
77 blkcg_policy[i]->pd_free_fn(blkg->pd[i]); 77 blkcg_policy[i]->pd_free_fn(blkg->pd[i]);
78 78
79 if (blkg->blkcg != &blkcg_root)
80 blk_exit_rl(blkg->q, &blkg->rl);
81
82 blkg_rwstat_exit(&blkg->stat_ios); 79 blkg_rwstat_exit(&blkg->stat_ios);
83 blkg_rwstat_exit(&blkg->stat_bytes); 80 blkg_rwstat_exit(&blkg->stat_bytes);
84 kfree(blkg); 81 kfree(blkg);
@@ -112,13 +109,6 @@ static struct blkcg_gq *blkg_alloc(struct blkcg *blkcg, struct request_queue *q,
112 blkg->blkcg = blkcg; 109 blkg->blkcg = blkcg;
113 atomic_set(&blkg->refcnt, 1); 110 atomic_set(&blkg->refcnt, 1);
114 111
115 /* root blkg uses @q->root_rl, init rl only for !root blkgs */
116 if (blkcg != &blkcg_root) {
117 if (blk_init_rl(&blkg->rl, q, gfp_mask))
118 goto err_free;
119 blkg->rl.blkg = blkg;
120 }
121
122 for (i = 0; i < BLKCG_MAX_POLS; i++) { 112 for (i = 0; i < BLKCG_MAX_POLS; i++) {
123 struct blkcg_policy *pol = blkcg_policy[i]; 113 struct blkcg_policy *pol = blkcg_policy[i];
124 struct blkg_policy_data *pd; 114 struct blkg_policy_data *pd;
@@ -377,7 +367,6 @@ static void blkg_destroy_all(struct request_queue *q)
377 } 367 }
378 368
379 q->root_blkg = NULL; 369 q->root_blkg = NULL;
380 q->root_rl.blkg = NULL;
381} 370}
382 371
383/* 372/*
@@ -403,41 +392,6 @@ void __blkg_release_rcu(struct rcu_head *rcu_head)
403} 392}
404EXPORT_SYMBOL_GPL(__blkg_release_rcu); 393EXPORT_SYMBOL_GPL(__blkg_release_rcu);
405 394
406/*
407 * The next function used by blk_queue_for_each_rl(). It's a bit tricky
408 * because the root blkg uses @q->root_rl instead of its own rl.
409 */
410struct request_list *__blk_queue_next_rl(struct request_list *rl,
411 struct request_queue *q)
412{
413 struct list_head *ent;
414 struct blkcg_gq *blkg;
415
416 /*
417 * Determine the current blkg list_head. The first entry is
418 * root_rl which is off @q->blkg_list and mapped to the head.
419 */
420 if (rl == &q->root_rl) {
421 ent = &q->blkg_list;
422 /* There are no more block groups, hence no request lists */
423 if (list_empty(ent))
424 return NULL;
425 } else {
426 blkg = container_of(rl, struct blkcg_gq, rl);
427 ent = &blkg->q_node;
428 }
429
430 /* walk to the next list_head, skip root blkcg */
431 ent = ent->next;
432 if (ent == &q->root_blkg->q_node)
433 ent = ent->next;
434 if (ent == &q->blkg_list)
435 return NULL;
436
437 blkg = container_of(ent, struct blkcg_gq, q_node);
438 return &blkg->rl;
439}
440
441static int blkcg_reset_stats(struct cgroup_subsys_state *css, 395static int blkcg_reset_stats(struct cgroup_subsys_state *css,
442 struct cftype *cftype, u64 val) 396 struct cftype *cftype, u64 val)
443{ 397{
@@ -1230,7 +1184,6 @@ int blkcg_init_queue(struct request_queue *q)
1230 if (IS_ERR(blkg)) 1184 if (IS_ERR(blkg))
1231 goto err_unlock; 1185 goto err_unlock;
1232 q->root_blkg = blkg; 1186 q->root_blkg = blkg;
1233 q->root_rl.blkg = blkg;
1234 spin_unlock_irq(q->queue_lock); 1187 spin_unlock_irq(q->queue_lock);
1235 rcu_read_unlock(); 1188 rcu_read_unlock();
1236 1189