Messages in this thread Patch in this message | | | From | Pavel Begunkov <> | Subject | [PATCH 1/4] io_uring: remove setting REQ_F_MUST_PUNT in rw | Date | Sun, 21 Jun 2020 13:09:50 +0300 |
| |
io_{read,write}() { ... copy_iov: // prep async if (!(flags & REQ_F_NOWAIT) && !file_can_poll(file)) flags |= REQ_F_MUST_PUNT; }
REQ_F_MUST_PUNT there is pointless, because if it happens then REQ_F_NOWAIT is known to be _not_ set, and the request will go async path in __io_queue_sqe() anyway. file_can_poll() check is also repeated in arm_poll*(), so don't need it.
Remove the mentioned assignment REQ_F_MUST_PUNT in preparation for killing the flag.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> --- fs/io_uring.c | 8 -------- 1 file changed, 8 deletions(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c index 44614571e285..e7ce1608087f 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2915,10 +2915,6 @@ static int io_read(struct io_kiocb *req, bool force_nonblock) inline_vecs, &iter); if (ret) goto out; - /* any defer here is final, must blocking retry */ - if (!(req->flags & REQ_F_NOWAIT) && - !file_can_poll(req->file)) - req->flags |= REQ_F_MUST_PUNT; /* if we can retry, do so with the callbacks armed */ if (io_rw_should_retry(req)) { ret2 = io_iter_do_read(req, &iter); @@ -3050,10 +3046,6 @@ static int io_write(struct io_kiocb *req, bool force_nonblock) inline_vecs, &iter); if (ret) goto out_free; - /* any defer here is final, must blocking retry */ - if (!(req->flags & REQ_F_NOWAIT) && - !file_can_poll(req->file)) - req->flags |= REQ_F_MUST_PUNT; return -EAGAIN; } } -- 2.24.0
| |