diff options
author | Kemeng Shi <shikemeng@huawei.com> | 2022-12-05 14:57:09 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-12-05 23:45:31 +0300 |
commit | eea3e8b74aa1648fc96b739458d067a6e498c302 (patch) | |
tree | 38d8c69f8551e406c7fda8b19063d6c846002afd /block | |
parent | 9c9f209d9d81ea67cd84f53f470a592c252d845d (diff) | |
download | linux-eea3e8b74aa1648fc96b739458d067a6e498c302.tar.xz |
blk-throttle: Use more suitable time_after check for update of slice_start
There is no need to update tg->slice_start[rw] to start when they are
equal already. So remove "eq" part of check before update slice_start.
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
Link: https://lore.kernel.org/r/20221205115709.251489-10-shikemeng@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-throttle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 413e668249cf..6fb5a2f9e1ee 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -645,7 +645,7 @@ static inline void throtl_start_new_slice_with_credit(struct throtl_grp *tg, * that bandwidth. Do try to make use of that bandwidth while giving * credit. */ - if (time_after_eq(start, tg->slice_start[rw])) + if (time_after(start, tg->slice_start[rw])) tg->slice_start[rw] = start; tg->slice_end[rw] = jiffies + tg->td->throtl_slice; |