Skip to content

Commit 62ef731

Browse files
isilenceaxboe
authored andcommitted
io_uring: remove setting REQ_F_MUST_PUNT in rw
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> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 895aa7b commit 62ef731

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

fs/io_uring.c

-8
Original file line numberDiff line numberDiff line change
@@ -2920,10 +2920,6 @@ static int io_read(struct io_kiocb *req, bool force_nonblock)
29202920
inline_vecs, &iter);
29212921
if (ret)
29222922
goto out_free;
2923-
/* any defer here is final, must blocking retry */
2924-
if (!(req->flags & REQ_F_NOWAIT) &&
2925-
!file_can_poll(req->file))
2926-
req->flags |= REQ_F_MUST_PUNT;
29272923
/* if we can retry, do so with the callbacks armed */
29282924
if (io_rw_should_retry(req)) {
29292925
ret2 = io_iter_do_read(req, &iter);
@@ -3057,10 +3053,6 @@ static int io_write(struct io_kiocb *req, bool force_nonblock)
30573053
inline_vecs, &iter);
30583054
if (ret)
30593055
goto out_free;
3060-
/* any defer here is final, must blocking retry */
3061-
if (!(req->flags & REQ_F_NOWAIT) &&
3062-
!file_can_poll(req->file))
3063-
req->flags |= REQ_F_MUST_PUNT;
30643056
return -EAGAIN;
30653057
}
30663058
}

0 commit comments

Comments
 (0)