[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3b302e60-cb5a-a193-db13-5ca0ef5603cc@kernel.dk>
Date: Fri, 6 May 2022 14:50:49 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Hao Xu <haoxu.linux@...il.com>, io-uring@...r.kernel.org
Cc: Pavel Begunkov <asml.silence@...il.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/5] io_uring: implement multishot mode for accept
On 5/6/22 1:01 AM, Hao Xu wrote:
> @@ -5748,8 +5758,12 @@ static int io_accept(struct io_kiocb *req, unsigned int issue_flags)
> if (!fixed)
> put_unused_fd(fd);
> ret = PTR_ERR(file);
> - if (ret == -EAGAIN && force_nonblock)
> - return -EAGAIN;
> + if (ret == -EAGAIN && force_nonblock) {
> + if ((req->flags & REQ_F_APOLL_MULTI_POLLED) ==
> + REQ_F_APOLL_MULTI_POLLED)
> + ret = 0;
> + return ret;
FWIW, this
if ((req->flags & REQ_F_APOLL_MULTI_POLLED) == REQ_F_APOLL_MULTI_POLLED)
is identical to
if (req->flags & REQ_F_APOLL_MULTI_POLLED)
but I suspect this used to check more flags (??), because as it stands
it seems a bit nonsensical.
--
Jens Axboe
Powered by blists - more mailing lists