aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-12-03 11:23:54 -0700
committerJens Axboe <axboe@kernel.dk>2019-12-03 11:23:54 -0700
commit87f80d623c6c93c721b2aaead8a45e848bc8ffbf (patch)
tree02d8894b7e6d9e896fa767545f7abc958fae3c52 /fs/io_uring.c
parentblock: set the zone size in blk_revalidate_disk_zones atomically (diff)
downloadwireguard-linux-87f80d623c6c93c721b2aaead8a45e848bc8ffbf.tar.xz
wireguard-linux-87f80d623c6c93c721b2aaead8a45e848bc8ffbf.zip
io_uring: handle connect -EINPROGRESS like -EAGAIN
Right now we return it to userspace, which means the application has to poll for the socket to be writeable. Let's just treat it like -EAGAIN and have io_uring handle it internally, this makes it much easier to use. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index f7985f270d4a..6c22a277904e 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2242,7 +2242,7 @@ static int io_connect(struct io_kiocb *req, const struct io_uring_sqe *sqe,
ret = __sys_connect_file(req->file, &io->connect.address, addr_len,
file_flags);
- if (ret == -EAGAIN && force_nonblock) {
+ if ((ret == -EAGAIN || ret == -EINPROGRESS) && force_nonblock) {
io = kmalloc(sizeof(*io), GFP_KERNEL);
if (!io) {
ret = -ENOMEM;