io_uring: untie alloc_async_data and needs_async_data
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 28 Feb 2021 22:35:17 +0000 (22:35 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 25 Mar 2021 16:24:16 +0000 (10:24 -0600)
commit7b05f975a2674d95e4b3e299bf2a1d44dd2dc6dc
tree86294585b2785872dfcf51640ae3a97ee624c4c6
parent569495dadfdc9ab990d2ca88989385ceb1d4c1d9
io_uring: untie alloc_async_data and needs_async_data

All opcode handlers pretty well know whether they need async data or
not, and can skip testing for needs_async_data. The exception is rw
the generic path, but those test the flag by hand anyway. So, check the
flag and make io_alloc_async_data() allocating unconditionally.

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