io_uring: refactor scheduling in io_cqring_wait
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 4 Feb 2021 13:51:57 +0000 (13:51 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 4 Feb 2021 15:05:46 +0000 (08:05 -0700)
commitc1d5a224683b333ddbe278e455d639ccd4f5ca2b
tree5ec3e698f2b96e7e835b9473f52299c28f3f415f
parent9936c7c2bc76a0b2276f6d19de6d1d92f03deeab
io_uring: refactor scheduling in io_cqring_wait

schedule_timeout() with timeout=MAX_SCHEDULE_TIMEOUT is guaranteed to
work just as schedule(), so instead of hand-coding it based on arguments
always use the timeout version and simplify code.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c