diff options
author | Tejun Heo <tj@kernel.org> | 2019-08-28 18:05:51 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-08-28 23:17:01 -0400 |
commit | cf09a8ee19ad1f78b4e18cdde9f2a61133efacf5 (patch) | |
tree | fe93a7359f9de19bb6480a37847e76acfb64887f /block/blk-cgroup.c | |
parent | da8c828190fcd04662f594f3e00a184885aa5aa3 (diff) |
blkcg: pass @q and @blkcg into blkcg_pol_alloc_pd_fn()
Instead of @node, pass in @q and @blkcg so that the alloc function has
more context. This doesn't cause any behavior change and will be used
by io.weight implementation.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r-- | block/blk-cgroup.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 55a7dc227dfb..6a82ca3fb5cf 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -175,7 +175,7 @@ static struct blkcg_gq *blkg_alloc(struct blkcg *blkcg, struct request_queue *q, | |||
175 | continue; | 175 | continue; |
176 | 176 | ||
177 | /* alloc per-policy data and attach it to blkg */ | 177 | /* alloc per-policy data and attach it to blkg */ |
178 | pd = pol->pd_alloc_fn(gfp_mask, q->node); | 178 | pd = pol->pd_alloc_fn(gfp_mask, q, blkcg); |
179 | if (!pd) | 179 | if (!pd) |
180 | goto err_free; | 180 | goto err_free; |
181 | 181 | ||
@@ -1346,7 +1346,7 @@ int blkcg_activate_policy(struct request_queue *q, | |||
1346 | blk_mq_freeze_queue(q); | 1346 | blk_mq_freeze_queue(q); |
1347 | pd_prealloc: | 1347 | pd_prealloc: |
1348 | if (!pd_prealloc) { | 1348 | if (!pd_prealloc) { |
1349 | pd_prealloc = pol->pd_alloc_fn(GFP_KERNEL, q->node); | 1349 | pd_prealloc = pol->pd_alloc_fn(GFP_KERNEL, q, &blkcg_root); |
1350 | if (!pd_prealloc) { | 1350 | if (!pd_prealloc) { |
1351 | ret = -ENOMEM; | 1351 | ret = -ENOMEM; |
1352 | goto out_bypass_end; | 1352 | goto out_bypass_end; |
@@ -1362,7 +1362,7 @@ pd_prealloc: | |||
1362 | if (blkg->pd[pol->plid]) | 1362 | if (blkg->pd[pol->plid]) |
1363 | continue; | 1363 | continue; |
1364 | 1364 | ||
1365 | pd = pol->pd_alloc_fn(GFP_NOWAIT | __GFP_NOWARN, q->node); | 1365 | pd = pol->pd_alloc_fn(GFP_NOWAIT | __GFP_NOWARN, q, &blkcg_root); |
1366 | if (!pd) | 1366 | if (!pd) |
1367 | swap(pd, pd_prealloc); | 1367 | swap(pd, pd_prealloc); |
1368 | if (!pd) { | 1368 | if (!pd) { |