mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
Inexact, we may reject some not-overflowing values incorrectly, but they'll be on the order of exabytes allowed anyways. This fixes divide error crash on x86 if bps_limit is not configured or is set too high in the rare case that jiffy_elapsed is greater than HZ. Fixes:e8368b57c0("blk-throttle: use calculate_io/bytes_allowed() for throtl_trim_slice()") Fixes:8d6bbaada2("blk-throttle: prevent overflow while calculating wait time") Signed-off-by: Khazhismel Kumykov <khazhy@google.com> Acked-by: Tejun Heo <tj@kernel.org> Link: https://lore.kernel.org/r/20231020223617.2739774-1-khazhy@google.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
67 KiB
67 KiB