t/io_uring: only calculate per-file depth if we have files
authorJens Axboe <axboe@kernel.dk>
Wed, 17 Apr 2024 22:33:28 +0000 (16:33 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 17 Apr 2024 22:34:47 +0000 (16:34 -0600)
commite0bb44a5b2a67695f0b940772c70f678b323ec54
tree88e5a67b425b6899e3bca663410f18cea20dcd07
parentcf9c8b52a65139500729baaf8294a4bc953ae8d8
t/io_uring: only calculate per-file depth if we have files

If NOPs are used, then no files exist, and hence the app will throw
a floating point error when trying to divide by zero.

Fixes: 6067863c7016 ("t/io_uring: pre-calculate per-file depth")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/io_uring.c