From 577d664237a93f2c3d3a4d73f88b409795cba1b6 Mon Sep 17 00:00:00 2001 From: Baolin Wang Date: Thu, 8 Oct 2020 11:52:22 +0800 Subject: [PATCH 2102/2944] blk-throttle: Remove a meaningless parameter for throtl_downgrade_state() fix #30641350 commit 4247d9c8ba810c1d4a9502893a9ce1cec6abbf7a upstream The throtl_downgrade_state() is always used to change to LIMIT_LOW limitation, thus remove the latter meaningless parameter which indicates the limitation index. Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe Reviewed-by: Joseph Qi --- block/blk-throttle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/blk-throttle.c b/block/blk-throttle.c index ed52d3c..78e8b47 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -2107,7 +2107,7 @@ static void throtl_upgrade_state(struct throtl_data *td) queue_work(kthrotld_workqueue, &td->dispatch_work); } -static void throtl_downgrade_state(struct throtl_data *td, int new) +static void throtl_downgrade_state(struct throtl_data *td) { td->scale /= 2; @@ -2117,7 +2117,7 @@ static void throtl_downgrade_state(struct throtl_data *td, int new) return; } - td->limit_index = new; + td->limit_index = LIMIT_LOW; td->low_downgrade_time = jiffies; } @@ -2204,7 +2204,7 @@ static void throtl_downgrade_check(struct throtl_grp *tg) * cgroups */ if (throtl_hierarchy_can_downgrade(tg)) - throtl_downgrade_state(tg->td, LIMIT_LOW); + throtl_downgrade_state(tg->td); tg->last_bytes_disp[READ] = 0; tg->last_bytes_disp[WRITE] = 0; -- 1.8.3.1