diff options
author | Ryan Moeller <[email protected]> | 2020-09-08 14:39:16 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2020-09-08 11:39:16 -0700 |
commit | ebc4b52369ea10a2ad3df03b679acdd077e45a48 (patch) | |
tree | 6c8edb64248be4458980ab4b47d8b0c6a0f6e407 /module/zfs/arc.c | |
parent | 189272f78a775e3ef93499c21c8742c39ab36322 (diff) |
Avoid possibility of division by zero
When hz > 1000, msec / (1000 / hz) results in division by zero.
I found somewhere in FreeBSD using howmany(msec * hz, 1000) to convert
ms to ticks, avoiding the potential for a zero in the divisor.
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #10894
Diffstat (limited to 'module/zfs/arc.c')
0 files changed, 0 insertions, 0 deletions