Fix bad random offset generation for file map

If OS_RAND_MAX and FRAND_MAX are different, then ensure that
we use the right one. If not, our lookup cache could be outside
the allowed range, thus causing a segfault by indexing
f->file_map beyond end of the array.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 file changed