io_uring: rethink def->needs_async_data
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 28 Feb 2021 22:35:18 +0000 (22:35 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 25 Mar 2021 16:24:16 +0000 (10:24 -0600)
commit8ab20733c435d0c72c663681f5d62d90913a04bf
tree72c12bd06af4ec932b9f0bb1ff73c79f1c75c2d2
parent7b05f975a2674d95e4b3e299bf2a1d44dd2dc6dc
io_uring: rethink def->needs_async_data

needs_async_data controls allocation of async_data, and used in two
cases. 1) when async setup requires it (by io_req_prep_async() or
handler themselves), and 2) when op always needs additional space to
operate, like timeouts do.

Opcode preps already don't bother about the second case and do
allocation unconditionally, restrict needs_async_data to the first case
only and rename it into needs_async_setup.

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