diff options
author | Wen Yang <wenyang@linux.alibaba.com> | 2020-01-20 18:04:43 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-01-22 10:34:11 -0700 |
commit | 554d21efb0d2e102a14f8c4b6bdfbcfbe54b3c65 (patch) | |
tree | 0e784efc85671e7bb4e4668d115bacba43ebf54a /net/sched | |
parent | b7f22d993f51c64d79b7fd7ad2c060e3fdc006c0 (diff) | |
download | linux-stable-554d21efb0d2e102a14f8c4b6bdfbcfbe54b3c65.tar.gz linux-stable-554d21efb0d2e102a14f8c4b6bdfbcfbe54b3c65.tar.bz2 linux-stable-554d21efb0d2e102a14f8c4b6bdfbcfbe54b3c65.zip |
block, bfq: improve arithmetic division in bfq_delta()
do_div() does a 64-by-32 division. Use div64_ul() instead of it
if the divisor is unsigned long, to avoid truncation to 32-bit.
And as a nice side effect also cleans up the function a bit.
Signed-off-by: Wen Yang <wenyang@linux.alibaba.com>
Cc: Paolo Valente <paolo.valente@linaro.org>
Cc: Jens Axboe <axboe@fb.com>
Cc: linux-block@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'net/sched')
0 files changed, 0 insertions, 0 deletions