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 <[email protected]> Acked-by: Tejun Heo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent d200ca1 commit 8277825

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

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)