diff options
author | Christoph Hellwig <hch@lst.de> | 2022-04-20 06:27:22 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-05-02 14:06:20 -0600 |
commit | 82778259eb201870d6d4f95ca4162de60a682343 (patch) | |
tree | aff35bbab7371d0154ba48791a6f02e321712c00 /block | |
parent | d200ca143ac6d0b4391b4e811e67e1a36461d501 (diff) | |
download | linux-82778259eb201870d6d4f95ca4162de60a682343.tar.bz2 |
blk-cgroup: cleanup blkcg_maybe_throttle_current
Use blkcg_css instead of opencoding it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20220420042723.1010598-15-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-cgroup.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 5684a8ce1f75..a91f8ae18b49 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -1808,7 +1808,6 @@ static void blkcg_maybe_throttle_blkg(struct blkcg_gq *blkg, bool use_memdelay) void blkcg_maybe_throttle_current(void) { struct request_queue *q = current->throttle_queue; - struct cgroup_subsys_state *css; struct blkcg *blkcg; struct blkcg_gq *blkg; bool use_memdelay = current->use_memdelay; @@ -1820,12 +1819,7 @@ void blkcg_maybe_throttle_current(void) current->use_memdelay = false; rcu_read_lock(); - css = kthread_blkcg(); - if (css) - blkcg = css_to_blkcg(css); - else - blkcg = css_to_blkcg(task_css(current, io_cgrp_id)); - + blkcg = css_to_blkcg(blkcg_css()); if (!blkcg) goto out; blkg = blkg_lookup(blkcg, q); |