]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix pre-prepped issue with force_nonblock == true
authorJens Axboe <axboe@kernel.dk>
Mon, 16 Dec 2019 05:13:43 +0000 (22:13 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 18 Dec 2019 02:57:20 +0000 (19:57 -0700)
commit4c7160a4f0caf53f497361a6e913f2b71cb0ef11
treeecb67299672c337c0c0bef786cffb5f3fc3d5d25
parentd8a8e901d3505d50b7cea1e51ebe096c2875c716
io_uring: fix pre-prepped issue with force_nonblock == true

Some of these code paths assume that any force_nonblock == true issue
is not prepped, but that's not true if we did prep as part of link setup
earlier. Check if we already have an async context allocate before
setting up a new one.

Cleanup the async context setup in general, we have a lot of duplicated
code there.

Fixes: 9c3bbcaf435b ("io_uring: ensure async punted sendmsg/recvmsg requests copy data")
Fixes: 3adcd29a9815 ("io_uring: ensure async punted read/write requests copy iovec")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c