Skip to content

Commit 8277825

Browse files
Christoph Hellwigaxboe
authored andcommitted
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>
1 parent d200ca1 commit 8277825

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

block/blk-cgroup.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,6 @@ static void blkcg_maybe_throttle_blkg(struct blkcg_gq *blkg, bool use_memdelay)
18081808
void blkcg_maybe_throttle_current(void)
18091809
{
18101810
struct request_queue *q = current->throttle_queue;
1811-
struct cgroup_subsys_state *css;
18121811
struct blkcg *blkcg;
18131812
struct blkcg_gq *blkg;
18141813
bool use_memdelay = current->use_memdelay;
@@ -1820,12 +1819,7 @@ void blkcg_maybe_throttle_current(void)
18201819
current->use_memdelay = false;
18211820

18221821
rcu_read_lock();
1823-
css = kthread_blkcg();
1824-
if (css)
1825-
blkcg = css_to_blkcg(css);
1826-
else
1827-
blkcg = css_to_blkcg(task_css(current, io_cgrp_id));
1828-
1822+
blkcg = css_to_blkcg(blkcg_css());
18291823
if (!blkcg)
18301824
goto out;
18311825
blkg = blkg_lookup(blkcg, q);

0 commit comments

Comments
 (0)