Skip to content

Commit

Permalink
blk-throttle: Use more suitable time_after check for update of slice_…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
Signed-off-by: Kemeng Shi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
shikemeng authored and axboe committed Dec 5, 2022
1 parent 9c9f209 commit eea3e8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-throttle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit eea3e8b

Please sign in to comment.