io_uring: refactor io_read for unsupported nowait
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 4 Feb 2021 13:51:59 +0000 (13:51 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 4 Feb 2021 15:05:46 +0000 (08:05 -0700)
commit6713e7a6145a4b5a61e33a37f0b4d06ca6d2c6d8
treed39740929f0bbc40456eef21f4523c48ad036d9f
parenteeb60b9ab4000d20261973642dfc9fb0e4b5d073
io_uring: refactor io_read for unsupported nowait

!io_file_supports_async() case of io_read() is hard to read, it jumps
somewhere in the middle of the function just to do async setup and fail
on a similar check. Call io_setup_async_rw() directly for this case,
it's much easier to follow.

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