Revert "blk_iocost: fix more out of bound shifts"
This reverts commit 31aab2e514
.
This commit is contained in:
parent
892d56770b
commit
3eaf19ddc8
1 changed files with 3 additions and 5 deletions
|
@ -2022,7 +2022,7 @@ static void ioc_forgive_debts(struct ioc *ioc, u64 usage_us_sum, int nr_debtors,
|
|||
struct ioc_now *now)
|
||||
{
|
||||
struct ioc_gq *iocg;
|
||||
u64 dur, usage_pct, nr_cycles, nr_cycles_shift;
|
||||
u64 dur, usage_pct, nr_cycles;
|
||||
|
||||
/* if no debtor, reset the cycle */
|
||||
if (!nr_debtors) {
|
||||
|
@ -2084,12 +2084,10 @@ static void ioc_forgive_debts(struct ioc *ioc, u64 usage_us_sum, int nr_debtors,
|
|||
old_debt = iocg->abs_vdebt;
|
||||
old_delay = iocg->delay;
|
||||
|
||||
nr_cycles_shift = min_t(u64, nr_cycles, BITS_PER_LONG - 1);
|
||||
if (iocg->abs_vdebt)
|
||||
iocg->abs_vdebt = iocg->abs_vdebt >> nr_cycles_shift ?: 1;
|
||||
|
||||
iocg->abs_vdebt = iocg->abs_vdebt >> nr_cycles ?: 1;
|
||||
if (iocg->delay)
|
||||
iocg->delay = iocg->delay >> nr_cycles_shift ?: 1;
|
||||
iocg->delay = iocg->delay >> nr_cycles ?: 1;
|
||||
|
||||
iocg_kick_waitq(iocg, true, now);
|
||||
|
||||
|
|
Loading…
Reference in a new issue