aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-mq-sched.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2020-09-11 18:40:49 -0400
committerJens Axboe <axboe@kernel.dk>2020-09-11 16:41:47 -0600
commit769b628de0b9a7ab0b81e6eecca5ee7bf66e978d (patch)
tree39ebaa9dc4a2a062fe38ea3aebfdce8d1c642cc9 /block/blk-mq-sched.h
parent0806e60f31ec10822cd230d12603169d1bb7840e (diff)
downloadlinux-769b628de0b9a7ab0b81e6eecca5ee7bf66e978d.tar.gz
blk-iocost: fix divide-by-zero in transfer_surpluses()
Conceptually, root_iocg->hweight_donating must be less than WEIGHT_ONE but all hweight calculations round up and thus it may end up >= WEIGHT_ONE triggering divide-by-zero and other issues. Bound the value to avoid surprises. Fixes: e08d02aa5fc9 ("blk-iocost: implement Andy's method for donation weight updates") Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq-sched.h')
0 files changed, 0 insertions, 0 deletions