diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2022-05-02 00:25:10 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2022-05-02 00:25:10 +0300 |
commit | f930b69a8944ab3f018e2a175ddbd16e71348df9 (patch) | |
tree | bfde4972394d741196bcd1cf173bfda4639123a7 /block/blk-iocost.c | |
parent | fdc33eba11c5919199f3d13dc53571cc7bf19d7d (diff) | |
parent | 672c0c5173427e6b3e2a9bbb7be51ceeec78093a (diff) | |
download | linux-f930b69a8944ab3f018e2a175ddbd16e71348df9.tar.xz |
Merge tag 'v5.18-rc5' into devel
Merge in Linux 5.18-rc5 since new code to the STM32 driver
depend in a non-trivial way on the fixes merged in -rc5.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'block/blk-iocost.c')
-rw-r--r-- | block/blk-iocost.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/block/blk-iocost.c b/block/blk-iocost.c index 70a0a3d680a3..9bd670999d0a 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -2322,7 +2322,17 @@ static void ioc_timer_fn(struct timer_list *timer) iocg->hweight_donating = hwa; iocg->hweight_after_donation = new_hwi; list_add(&iocg->surplus_list, &surpluses); - } else { + } else if (!iocg->abs_vdebt) { + /* + * @iocg doesn't have enough to donate. Reset + * its inuse to active. + * + * Don't reset debtors as their inuse's are + * owned by debt handling. This shouldn't affect + * donation calculuation in any meaningful way + * as @iocg doesn't have a meaningful amount of + * share anyway. + */ TRACE_IOCG_PATH(inuse_shortage, iocg, &now, iocg->inuse, iocg->active, iocg->hweight_inuse, new_hwi); |